Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 – violet 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) – violet Apr 22 '10 at 5:50

Your Answer


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