Eu tenho este script ~/.ssh/confi
para se conectar a um servidor distante (muito distante, outro contintente) através de um firewall:
Host ras
HostName ras.cse.ust.hk
User farshidhss
ForwardAgent yes
ForwardX11 no
LogLevel DEBUG3
ServerAliveInterval 10
ServerAliveCountMax 3
Host farshid
HostName 10.89.226.143
User luca
ForwardX11 no
LogLevel DEBUG3
ServerAliveInterval 10
ServerAliveCountMax 3
ProxyCommand ssh -o 'ForwardAgent yes' -o 'ForwardX11 no' ras 'ssh-add && nc %h %p'
É estranho, porque 25% das vezes consigo me conectar com sucesso, mas na maioria das vezes recebo essas mensagens:
luca@jarvis:~$ ssh farshid
debug1: Executing proxy command: exec ssh -o 'ForwardAgent yes' -o 'ForwardX11 no' ras 'ssh-add && nc 10.89.226.143 22'
debug1: permanently_drop_suid: 1000
debug1: identity file /home/luca/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/luca/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/luca/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/luca/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/luca/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/luca/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/luca/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/luca/.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-4ubuntu2.1
debug2: resolving "ras.cse.ust.hk" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to ras.cse.ust.hk [143.89.40.101] port 22.
debug1: connect to address 143.89.40.101 port 22: Connection timed out
ssh: connect to host ras.cse.ust.hk port 22: Connection timed out
ssh_exchange_identification: Connection closed by remote host
Por que e como posso resolver isso?