百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
W

whisp

> 编程语言
开源

纯 PHP SSH 服务器 - 构建 PHP SSH 应用程序的最简单方式

182 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

纯 PHP SSH 服务器 - 构建 PHP SSH 应用程序的最简单方式

Whisp

Your pure* PHP SSH server ∙ the simplest & best way to build PHP SSH apps

[!NOTE] Quick example: sign our guestbook (See the code)

bash
ssh [email protected]

Got a one-time secret to share? ssh [email protected]

Explore the full docs at WhispPHP.com »

Installation

We recommend using our template project to get setup with Whisp & Laravel Prompts.

You can also add Whisp to an existing project with composer.

bash
composer require whispphp/whisp

Coming soon: Laravel package, Laravel starter kit, and a Docker image.

Requirements

  • PHP 8.2+
  • FFI, pcntl, and libsodium modules

Usage

Run the server on the port & IP you'd like, with the apps you want to make available. Each connection is forked to its own process and runs independently.

php
run();

// Array
$server->run(apps: [
    'default' => 'full-path/howdy.php',
    'guestbook' => 'full-path/guestbook.php',
    'chat-{roomName}' => 'full-path/chat.php',
]);

// String - set the default script that's always ran
$server->run('full-path/howdy.php');

Once running you can test with:

Default app

bash
ssh localhost -p2222

Guestbook app

bash
ssh guestbook@localhost -p2222

Environment variables available to each app

These are each available as environment variables.

Variable Description Notes
WHISP_APP The name of the app being requested
WHISP_CLIENT_IP The IP address of the connecting client
WHISP_USER_PUBLIC_KEY Validated public key of the connecting user This has been checked against their private key and can be trusted
WHISP_TTY The TTY information for the connection e.g. /dev/ttys072
WHISP_USERNAME The username used in the SSH connection Unavailable when no username passed, or when the username is a valid app
WHISP_COLS Requested terminal width in chars
WHISP_ROWS Requested terminal height
WHISP_WIDTH_PX Requested terminal width in pixels
WHISP_HEIGHT_PX Requested terminal height in pixels
WHISP_PARAM_{name} Passed only when using app params, i.e. chat-{roomName}

Clients requesting apps

There are two ways for clients to request an available app:

  1. Username method: ssh app@server - we use the 'username' here as the app name if it matches an available app.
    • Much cleaner, but means if you need the username for auth you can't define the app this way
  2. Command method: ssh server -t app - request an interactive shell (-t) with the requested app

Explore the full docs at WhispPHP.com », which also show how to setup Whisp to listen on port 22, start on boot, and restart on failure with systemd.

Live Examples

Play the Dinorun game ∙ See the code

bash
ssh [email protected]

Share one-time secrets Fully encrypted, and fully secure. Only the person with the valid private SSH key can access them.

bash
ssh [email protected]

View your sunrise/sunset times ∙ See the code

bash
ssh [email protected]

Find your closest World Heritage Sites

bash
ssh [email protected]

Support & Credits

This was developed by Ashley Hindle. If you like it, please star it, share it, and let me know!

  • Bluesky
  • Twitter
  • Website https://ashleyhindle.com

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPphpsshtui

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言