I failed in ssh connection to a server. Here is the output of connection
$ ssh -v [server]
OpenSSH_5.1p1 Debian-3ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /home/tim/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to [server] [server ip] port 22.
debug1: Connection established.
debug1: identity file /home/tim/.ssh/identity type -1
debug1: identity file /home/tim/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/tim/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host`
Anyone know what's wrong? Thanks and regards!
Check to see if the IP you are connecting from is showing up in
/etc/hosts.deny
on the remote server, and also check to see if you have lots of failed login attempts in/var/log/secure
. If you do, delete those entries out of both files and you can sometime get back in.sh_exchange_identification: Connection closed by remote host even if the key is correct
Login via console or try login multiple times in ssh
Then check the permission of /var/log/btmp it must be 600 chmod 600 /var/log/btmp
Also, try logging in without using your private key. the only way i know to do this is to temporarily move aside your private key file.