SSH Puzzles
Recently, when I tried to ssh to remote machine, it failed and reported the following error:
$ ssh -l $USER $REMOTE_MACHINE
ssh_exchange_identification: Connection closed by remote host
and I add -v parameter to print debugging messages about its progress.
$ ssh -v -l $USER $REMOTE_MACHINE
OpenSSH_5.1p1, OpenSSL 0.9.8i 15 Sep 2008
debug1: Connecting to $REMOTE_MACHINE port 22.
debug1: Connection established.
debug1: identity file ~/.ssh/identity type -1
debug1: identity file ~/.ssh/id_rsa type 1
debug1: identity file ~/.ssh/id_dsa type -1
debug1: ssh_exchange_identification:
debug1: ssh_exchange_identification:
debug1: ssh_exchange_identification: Error: Must authenticate before using this service.
ssh_exchange_identification: Connection closed by remote host
Then my colleague told me that I should pass the intranet firewall, and after I passed the firewall, ssh worked.
So stupid to forget passing firewall first.