homepage Welcome to WebmasterWorld Guest from 54.196.63.93
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
SSH: passwordless login with different users?
grahama

5+ Year Member



 
Msg#: 3190695 posted 7:41 pm on Dec 15, 2006 (gmt 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

 

mcavic

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3190695 posted 10:51 pm on Dec 16, 2006 (gmt 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.

bcc1234

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3190695 posted 11:11 pm on Dec 16, 2006 (gmt 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.

jtara

WebmasterWorld Senior Member jtara us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3190695 posted 3:44 am on Dec 17, 2006 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved