PDA

View Full Version : SSH without password for multiple users


jlehtoma
02-20-2010, 06:19 AM
I have been following the instructions both in Pc-connectivity page (http://maemo.org/development/documentation/pc_connectivity/) and a related post by greygoo (http://talk.maemo.org/showthread.php?t=41547&highlight=ssh+password).

After creating the private / public key pair on my host machine I have copied the public key on my tablet (N900) and appended the content to two locations:

1. /root/.ssh/authorized_keys (username: root)
2. /home/user/.ssh/authorized_keys (username: user)

I am able to ssh in to my tablet from the host machine without a password as root, but not as user. When I ssh in as user I'm still being prompted for the password.

Could this be a permission issue with /home/user/authorized_keys?

juise-
02-20-2010, 06:24 AM
2. /home/user/authorized_keys (username: user)


You have wrong path here. Should be:
/home/user/.ssh/authorized_keys

jlehtoma
02-20-2010, 06:26 AM
Thanks for the notice, that was just a typo (corrected in the original post). Path is correct on my tablet.

snnn
02-20-2010, 06:28 AM
the "user" account has been locked,you cannot do ssh login using this name

jlehtoma
02-20-2010, 06:53 AM
Problem solved, by creating a new user and repeating the steps I can now ssh the new user in without a password. Thanks!

valdyn
02-20-2010, 07:39 AM
you should probably use "ssh-copy-id" to transfer and add the key(s). That is theoretically more secure and certainly less error prone.

Rob1n
02-20-2010, 08:17 AM
the "user" account has been locked,you cannot do ssh login using this name

Sure you can - I do this all the time. You'll need to make sure the permissions on the .ssh directory and the authorized_keys file are set correctly (0700 for the directory and 0600 for the file).