SSH Key problem

Associate
Joined
31 May 2007
Posts
1,144
Hi Guys,

I have recently done a fresh install of Debian 4 and created an SSH key pair on my desktop machine with the intentions of using it to connect without the need for passwords.

I have put the contents of id_rsa.pub in authorized keys on the debian server but when I try to connect to it, it just says connection closed by xx.xx.xx.xx. If I rename my .ssh folder on my desktop machine so that it doesn't try to authenticate with the key pair then it works fine.

This is something I have come across before and never really had chance to diagnose, can anyone give any advice on what could cause this? Is it a config issue on the server side etc?

Any help is much appreciated.

Thanks,
 
Doesnt tell us a great deal tbh- can you run the ssh with the -vv or -vvv options for more debugging information?
 
It's usually the permissions on the files and folders that prevents this working, especially if strict modes are on. Try setting your .ssh folder to 'chmod 700' and the authorized_keys file to 'chmod 600 ...'.

Take a look in /var/log/syslog for details of the error or as Whiskas says enable debugging output. You will need debugging on the server side rather than the client though.
 
Back
Top Bottom