Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I used this tutorial to login into root without using password. Is there any way to make this work for normal user , not root user

share|improve this question

1 Answer 1

up vote 2 down vote accepted

sure. you can put your own key into ~/.ssh/authorized_keys

share|improve this answer
    
when i tried using 'normaluser' then it says that i don't have "~/.ssh/authorized_keys" this file. so you mean first i have to create the folder .ssh and then file called authorized_keys and then insert key in there –  John Apr 22 '10 at 4:29
    
yep. if you never ssh'd as 'normaluser' from that server, you do not have ~/.ssh, so you will have to create it. authorized_keys is usually created by the user himself,so you have to create it too :). There are cases when it is created automatically when user is added, but not without someone setting that up in /etc/skel first. –  solefald Apr 22 '10 at 4:35
    
Be sure to chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys or else sshd will refuse to check them, due to insecure permissions –  jrod Apr 22 '10 at 4:39
    
@jrod: i beg to differ. my ~/.ssh is 755 and ~/.ssh/authorized_keys is 644. works fine. –  solefald Apr 22 '10 at 4:47
    
Whoops, looks like I got it backwards. It's the keys themselves that need secure permissions. (~/.ssh/id_rsa) –  jrod Apr 22 '10 at 5:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.