A partir de uma nova instalação do Ubuntu 16.04, não consigo me conectar a determinados hosts por meio de um túnel SSH.
Outra peculiaridade foi que ao tentar estabelecer o túnel, via
$ ssh -fN -L 2222:192.168.1.115:22 [email protected]
Eu estava recebendo:
Unable to negotiate with 1.2.3.4 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
Eu consertei isso especificando:
$ ssh -fN -L 2222:192.168.1.115:22 -oKexAlgorithms=+diffie-hellman-group1-sha1 [email protected]
Um túnel é estabelecido, tentando conectar-se ao host especificado através dele, via
$ ssh -p 2222 -vvvv [email protected]
paira por cerca de um minuto e meio em:
$ 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
Eventualmente falha após cerca de 3 minutos com:
channel 4: open failed: connect failed:
ssh_exchange_identification: Connection closed by remote host
A conexão de outros dispositivos / sistemas operacionais, como o ConnectBot no Android, funciona como esperado.
Alguém poderia oferecer alguns indicadores de solução de problemas?
Tags ssh ubuntu ssh-tunnel