SSH keygen auth problems

Go to solution
Stuart Browne
Honored Contributor

Re: SSH keygen auth problems

When you generated the keys using 'ssh-keygen', did you put in a password?

Also, did you use 'ssh-agent' on both sides?

If you put a password in when generating the keys, you will always be prompted for it, unless you use 'ssh-agent' (which is a password-cache for known keys basically).
One long-haired git at your service...
Matt Palmer_2
Respected Contributor

Re: SSH keygen auth problems

Hi Everyone,

I've cracked it!! thanks for all the help. In the end after verbosing the o/p, the key auth was not getting processed because the directory permissions on the home directory for the user on the remote box were not 755 so the connection was not allowed. -Even though the .ssh directory inside there was fine.

So changed file perms and now everything is fine

Many Thanks

Alexander Chuzhoy
Honored Contributor

Re: SSH keygen auth problems

the permissions on home directory shouldn't be 755 for this purpose (it works perfectly even when the permission is 700).
It's the permission on .ssh folder that matters.It shouldn't be too open, i.e. granting 777 will prompt for password,755 however will alow passwordless login.

Best regards.
Olivier Drouin
Trusted Contributor

Re: SSH keygen auth problems

All the permission from "/" up to "~/.ssh" are important.

If .ssh is 700 but your home directory is 777 it will ask for a passwd.