反向隧道问题

时间:2018-04-22 13:35:40

标签: reverse tunnel

我正在建立从localhost(win7)到remoteServer(Debian)的反向隧道。在localhost上我运行:

  

plink.exe -R 12345:localhost:22 username@remoteServer.com。

但是当我尝试从RemoteServer连接回localhost时出现错误:

root@remoteServer:~# ssh -v -p 12345 127.0.0.1
OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 12345.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
root@remoteServer:~#

我在sshd_config中启用了 GatewayPorts yes 并重新启动了sshd。 我使用管理员权限运行cmd.exe。

1 个答案:

答案 0 :(得分:0)

解决。需要在localhost(win7)上安装SSH服务器。 plink.exe只是一个客户端。