Gandi Wiki


You are on a question's page

closed

Question "SSH and key based authentication", by Rahoul B.

I cannot get key-based authentication working. I'm using Ubuntu Jaunty and have previously set this up on other servers, so I cannot see what I'm doing wrong.

Firstly, I upload my public key. Then I create a /home/myusername/.ssh folder (chmod 700) and a /home/myusername/.ssh/authorized_keys file (chmod 600) and cat my public key into that.

Try to connect and it asks for my password.

I've also tried comparing /etc/ssh/sshd_config to the one on another server where key-based access works - the only difference I could see was there was no "AllowUsers" directive in the Gandi file - so I added "AllowUsers myusername@*" and reloaded ssh.

Try to connect and it still asks for my password.

Any ideas what I've missed?

Follow-up, by Gavin S.

Same for me. Any chance of fixing this (given that no solution is posted)?

Follow-up, by Deniz Y.

Yes, Yes, Yes…. I have the same problem with lennny. Can anyone solve this maybe?

Follow-up, by Emerick M. (Gandi)

Yes, you can fix it. Install or reconfigure the locales package, verify that the file /etc/default/locale has a LANG directive completed by the locale you use.

Next, change the permissions of the home : chmod 755 ~user

It will work fine, check logs for the errors about the auth on your system (/var/log/auth.log and /var/log/syslog)

Last modified: 17 Dec 2009 at 17:17 by Rudy g. (Gandi)