【发布时间】:2018-04-22 13:35:39
【问题描述】:
我正在设置从 localhost (win7) 到 remoteServer (Debian) 的反向隧道。在本地主机上我运行:
plink.exe -R 12345:localhost:22 用户名@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。
【问题讨论】: