Conexão SSH recusada e aceita mais tarde

0

Eu estou observando um comportamento extrangeiro entre dois hosts e gostaria de corrigi-lo. Quando eu faço este comando no hostA

ssh hostB

Eu recebo um Connection refused . Eu configurei hostB como um nome de host em /etc/hosts

No entanto, se eu fizer um ping do hostA para o hostB e tentar novamente o ssh, ele funciona.

ping hostB
ssh hostB //now it works

Em alguns casos, o ping não corrige o problema, que é anoying. Alguma idéia do que poderia causar esse comportamento?

HostA: Ubuntu em uma caixa virtual

HostB: ARM linux

Saída de ssh -v hostB

~$ ssh -v 192.168.1.2
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 192.168.1.2 [192.168.1.2] port 22.
debug1: Connection established.
debug1: identity file /home/duser/.ssh/id_rsa type 1
debug1: identity file /home/duser/.ssh/id_rsa-cert type -1
debug1: identity file /home/duser/.ssh/id_dsa type -1
debug1: identity file /home/duser/.ssh/id_dsa-cert type -1
debug1: identity file /home/duser/.ssh/id_ecdsa type -1
debug1: identity file /home/duser/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/duser/.ssh/id_ed25519 type -1
debug1: identity file /home/duser/.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.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6p1 Ubuntu-2ubuntu1
debug1: match: OpenSSH_6.6p1 Ubuntu-2ubuntu1 pat OpenSSH_6.5*,OpenSSH_6.6* compat 0x14000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr [email protected] none
debug1: kex: client->server aes128-ctr [email protected] none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 33:ba:97:dc:6f:36:de:a7:0c:64:1e:05:1a:6c:f2:f2
debug1: Host '192.168.1.2' is known and matches the ECDSA host key.
debug1: Found key in /home/duser/.ssh/known_hosts:33
debug1: ssh_ecdsa_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
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/duser/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/duser/.ssh/id_dsa
debug1: Trying private key: /home/duser/.ssh/id_ecdsa
debug1: Trying private key: /home/duser/.ssh/id_ed25519
debug1: Next authentication method: password
[email protected]'s password: 
debug1: Authentication succeeded (password).
Authenticated to 192.168.1.2 ([192.168.1.2]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8

Iptables estão todos vazios e com ACCEPT

    
por Ricard Molins 12.07.2017 / 09:09

0 respostas

Tags