客户端
python run_client.py -c config_c.json
服务端
python run_server.py -c config_s.json
假设公网机器的ip是 192.168.9.224
{
"port": 18888,
"password": "helloworld",
"path": "/websocket_path"
}
然后启动:
python run_server.py -c config_s.json
配置config_c.json
{
"server": {
"port": 18888,
"host": "192.168.9.224",
"https": false,
"password": "helloworld",
"path": "/websocket_path"
},
"client": [
{
"name": "ssh1",
"remote_port": 12222,
"local_port": 22,
"local_ip": "127.0.0.1"
}
]
}
然后启动:
python run_client.py -c config_c.json
ssh -oPort=12222 test@192.168.9.224