从新安装的Ubuntu 16.04,我无法通过SSH隧道连接到某些主机。
另一个奇怪的是,当试图build立隧道,通过
$ ssh -fN -L 2222:192.168.1.115:22 [email protected]
我得到:
Unable to negotiate with 1.2.3.4 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
我通过指定:
$ ssh -fN -L 2222:192.168.1.115:22 -oKexAlgorithms=+diffie-hellman-group1-sha1 [email protected]
一个隧道build立,尝试通过它连接到指定的主机
$ ssh -p 2222 -vvvv [email protected]
大约一分半钟挂在:
$ ssh -p 2222 -vvvv [email protected] OpenSSH_7.2p2 Ubuntu-4, OpenSSL 1.0.2g-fips 1 Mar 2016 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: resolving "127.0.0.1" port 2222 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /home/ansel/.ssh/id_rsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/ansel/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/ansel/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/ansel/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/ansel/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/ansel/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/ansel/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/ansel/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4
大约3分钟后,它最终失败:
channel 4: open failed: connect failed: ssh_exchange_identification: Connection closed by remote host
从其他设备/操作系统(如Android上的ConnectBot)进行连接,可按预期工作。
任何人都可以提供任何故障指针?