SSH 代理服务器:SSH Piper

jopen 10年前

SSH Piper 是一款 根可以 根据 ssh 用户名选择 目标服务器 的 ssh 代理软件

+---------+                      +------------------+          +-----------------+  |         |                      |                  |          |                 |  |   Bob   +----ssh -l bob----+   |   SSH Piper   +------------->   Bob' machine  |  |         |                  |   |               |  |          |                 |  +---------+                  |   |               |  |          +-----------------+                               +---> pipe-by-name--+  |                               +---------+                  |   |               |  |          +-----------------+  |         |                  |   |               |  |          |                 |  |  Alice  +----ssh -l alice--+   |               +------------->  Alice' machine |  |         |                      |                  |          |                 |  +---------+                      +------------------+          +-----------------+       Downstream                         SSH Piper                       Upstream

安装方法:

go get github.com/tg123/sshpiper/sshpiperd  go install github.com/tg123/sshpiper/sshpiperd

运行:

$GOPATH/src/github.com/tg123/sshpiper/sshpiperd/example/showme.sh

将启动 sshpiper 服务器:

ssh 127.0.0.1 -p 2222 -l github # connect to github.com:22  ssh 127.0.0.1 -p 2222 -l linode # connect to lish-atlanta.linode.com:22

连接方法:

$ ssh 0 -p 2222 -l linode.com:22  linode@0's password:    $ ssh 0 -p 2222 -l github  Permission denied (publickey).

配置:

$ sshpiperd -h    -h=false: Print help and exit    -i="/etc/ssh/ssh_host_rsa_key": Key file for SSH Piper    -l="0.0.0.0": Listening Address    -p=2222: Listening Port    -w="/var/sshpiper": Working Dir

项目主页:http://www.open-open.com/lib/view/home/1418094509527