PDA

View Full Version : [SOLVED] ssh: Permission denied (publickey) if i dont login to UI



133
October 23rd, 2010, 09:36 PM
Hi guys,

I setup this ssh with PasswordAuthentication no on my ubuntu 10.04, I have this problem that ssh login from another machine only work after login to UI first.

Steps:
1. Login to UI and setup ssh with PasswordAuthentication no.
2. Test it from another machine - it works.
3. Reboot the machine (ssh server) without login to UI, try ssh login from another machine - it failed with Permission denied (publickey).
4. Login to UI and try ssh login from another machine - it works again.

So why is that I have to login to the machine first before I can ssh login from another machine? it doesnt make sense.

Can anyone help?

Cheers
133

FuturePilot
October 23rd, 2010, 10:05 PM
Did you select the encrypted home option when installing?

CharlesA
October 24th, 2010, 02:01 AM
Did you select the encrypted home option when installing?

That was my thought as well. If you have an encrypted home directory, it won't be able to access the keys, since the home directory won't be decrypted until you login.

133
October 24th, 2010, 11:34 AM
Yes. That expplain why it is not working then.... :-(
Is there any solution/workaround to that?

Thanks

133

CharlesA
October 24th, 2010, 11:49 AM
See here: http://ubuntuforums.org/showthread.php?t=1602399

133
October 24th, 2010, 12:29 PM
It works now brilliant!!! thanks CharlesA!!!