如何解决这个错误:“ssh_exchange_identification:连接被远程主机closures”
错误: ssh_exchange_identification:由远程主机closures的连接 有很多提出的解决scheme,但似乎没有解决我的问题。 这是我想要完成的: 我有一个服务器(10.0.0.5)的SSH上。 服务器有以下用户及其shell: passport , shell=/bin/false user1, shell=git-shell user2, shell=git-shell me, shell=bash sshd_config文件的末尾有以下条目: AllowTcpForwarding no Match User passport,user1,user2 AllowTcpForwarding true PermitOpen 10.0.0.5:8080 PermitOpen 10.0.0.5:22 我也启用了公钥authentication。 目标是禁止所有来自SSH的tcp转发,并且只允许上述用户在两个端口上转发: – SSH – a web server 在我的/etc/hosts.allow和.deny文件中没有条目。 我在/home/passport/.ssh/authorized_keys设置了相应的authorized_keys file (只是ssh-rsa …)。 从Windows机器上,尝试SSH: ssh [email protected] -N -L 22:10.0.0.5:22 -L 8080:10.0.0.5:8080 这工作正常,当“我尝试冲浪到http://127.0.0.1:8080 ”这意味着我的端口转发工作正常。 现在,我想尝试通过该隧道SSH并使用'user1': ssh -N [email protected] 在这一刻,我得到: […]