Eu encontrei uma solução para o problema acima usando o conjunto de utilitários que vem com a porta Unix do PuTTY.
sudo apt-get install plink
plink [email protected] -P 12345
Estou tentando conectar-me a um servidor SSH que está fora do meu controle com o seguinte comando:
ssh -v [email protected] -p 12345
Anteriormente, este comando funciona no Ubuntu 14.04 com o OpenSSH versão 6.6. A saída é:
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 12.34.56.78 [12.34.56.78] port 1234.
debug1: Connection established.
debug1: identity file /home/awesomeuser/.ssh/id_rsa type 1
debug1: identity file /home/awesomeuser/.ssh/id_rsa-cert type -1
debug1: identity file /home/awesomeuser/.ssh/id_dsa type -1
debug1: identity file /home/awesomeuser/.ssh/id_dsa-cert type -1
debug1: identity file /home/awesomeuser/.ssh/id_ecdsa type -1
debug1: identity file /home/awesomeuser/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/awesomeuser/.ssh/id_ed25519 type -1
debug1: identity file /home/awesomeuser/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7
debug1: Remote protocol version 2.0, remote software version Unknown_1.0.0
debug1: no match: Unknown_1.0.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 91:d9:c6:a4:84:3f:2a:6f:6d:d6:10:73:0b:4f:a8:d4
debug1: Host '[12.34.56.78]:1234' is known and matches the RSA host key.
debug1: Found key in /home/awesomeuser/.ssh/known_hosts:14
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
Welcome!debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/awesomeuser/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: password
debug1: Next authentication method: password
[email protected]'s password:
Eu recentemente atualizei minha máquina para o Ubuntu 16.04 com o OpenSSH versão 7.2. E recebi um erro:
OpenSSH_7.2p2 Ubuntu-4ubuntu1, 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 *
debug1: Connecting to 12.34.56.78 [12.34.56.78] port 12345.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/awesomeuser/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/awesomeuser/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/awesomeuser/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/awesomeuser/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/awesomeuser/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/awesomeuser/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/awesomeuser/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/awesomeuser/.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-4ubuntu1
debug1: Remote protocol version 2.0, remote software version Unknown_1.0.0
debug1: no match: Unknown_1.0.0
debug1: Authenticating to 12.34.56.78:12345 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
Received disconnect from 12.34.56.78 port 12345:2: Index was outside the bounds of the array.
Disconnected from 12.34.56.78 port 12345
Existe alguma maneira de resolver isso sem fazer o downgrade para o OpenSSH 6.6?
Eu encontrei uma solução para o problema acima usando o conjunto de utilitários que vem com a porta Unix do PuTTY.
sudo apt-get install plink
plink [email protected] -P 12345