Welcome to WebmasterWorld Guest from 54.167.46.29

Forum Moderators: bakedjake

Message Too Old, No Replies

SSH: passwordless login with different users?

     
7:41 pm on Dec 15, 2006 (gmt 0)

New User

10+ Year Member

joined:Sept 22, 2005
posts:12
votes: 0


Can a local user passwordlessly ssh into the home directory of a another differently named user?
In my case, local user, robert, needs to login to the remote home directory of user, webadmin.

Is this possible?

Locally as the 'robert' user, I created the key through:
ssh-keygen -t rsa
Then, I used cat to put the id_rsa.pub into the authorized_keys file located in the .ssh directory of 'webadmin' on the remote server.
For some most-likely obvious reason, this did not work as a password was still required to login.

many thanks in advance
g

10:51 pm on Dec 16, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 31, 2003
posts:1316
votes: 0


It's definitely possible, and that sounds right. Maybe it's picky about permissions? The .ssh directories should be mode 700 owned by the user where they reside. And the .pub and authorized_keys should be mode 600 or 644, also with the correct owners.
11:11 pm on Dec 16, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 1, 2002
posts:1421
votes: 0


Make sure you specify the remote user. Something like webadmin@remotehost, not just host. Otherwise, it tries robert@remotehost.

If you are using ssh2 then it's authorized_keys2, not authorized_keys.

3:44 am on Dec 17, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 26, 2005
posts:3041
votes: 0


If you are using ssh2 then it's authorized_keys2, not authorized_keys.

Actually, that's not quite right. authorized_keys2 is simply an ADDITIONAL file that is checked. It has nothing to do with whether you are using SSH1 or SSH2.

I think the idea is so that you can have a site-wide file that you copy or create a link to, then put user-specific keys in authorized_keys2. That's the way I use it, anyway, on my VPS account.

My VPS host requires access for support. Their key is in authorized_keys. I put my key(s) in authorzied_keys2.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members