Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Sep 19, 2008 8:45 pm 
Offline
Senior Newbie

Joined: Fri Sep 19, 2008 8:12 pm
Posts: 6
Website: http://pshields.net
AOL: mercurylime
I've set up my admin user to log in using the public/private key method, but for some reason, when I do the same with my root user, it doesn't work. Anybody know why?

In sshd_config, relevant code:

Code:
RSAAuthentication yes
PubkeyAuthentication yes
# AuthorizedKeysFile   %h/.ssh/authorized_keys
PermitRootLogin yes
AllowUsers pshields root



Then I saved the public key in /root/.ssh/authorized_keys

However, though my admin login works, the root login denies my key. Any ideas why?


Top
   
 Post subject:
PostPosted: Fri Sep 19, 2008 10:17 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
1. Uncomment the AuthorizedKeyFile line.
Code:
AuthorizedKeysFile   %h/.ssh/authorized_keys 


2. Restart SSH.
Code:
/etc/init.d/ssh restart


See if this works.....


Top
   
 Post subject:
PostPosted: Mon Sep 22, 2008 12:26 am 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
Also, check the permissions on the .ssh directory and the authorized_keys file. If they aren't correct, ssh will reject the key.


Top
   
 Post subject:
PostPosted: Thu Sep 25, 2008 1:55 am 
Offline
Senior Member

Joined: Fri Sep 12, 2008 3:17 am
Posts: 166
Website: http://independentchaos.com
For security purposes, you should either use sudo, or su - to go to root, but only after you've logged it from a limited user account.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group