ttyd是在web端一个简单的服务器命令行工具
类似我们在云厂商上直接ssh链接我们的服务器输入指令一样
download from the releases page
brew install ttyd
sudo snap install ttyd --classic
sudo apt-get update sudo apt-get install -y build-essential cmake git libjson-c-dev libwebsockets-dev git clone https://github.com/tsl0922/ttyd.git cd ttyd && mkdir build && cd build cmake .. make && sudo make install
You may also need to compile/install libwebsockets from source if the libwebsockets-dev package is outdated.
opkg install ttyd
clone the repo and follow the directions here.
download from the releases page
winget install tsl0922.ttyd
scoop install ttyd
官方文档
https://github.com/tsl0922/ttyd/wiki/Example-Usage
一定要查看这里的所有说明(如下:)
直接启动指令如下:
ttyd -p 8080 bash
这样启动,我们通过客户端访问
这里我们在页面输入啥都不可以!!!
ttyd -p 8080 -c root:123456-Ab@@ -W bash
nohup ttyd -p 8080 -B 127.0.0.1 -c root:123456-Ab@@ -W bash &