0

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

user9517
  • 114,104
  • 20
  • 206
  • 289

1 Answers1

2

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

solefald
  • 2,303
  • 15
  • 14
  • 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 –  Apr 22 '10 at 04: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 04: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 04:39
  • @jrod: i beg to differ. my `~/.ssh` is `755` and `~/.ssh/authorized_keys` is `644`. works fine. – solefald Apr 22 '10 at 04: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 05:50