su ruser switch to the new user mkdir ssh chmod 700 ssh nano ssh autho

1
2
3
4
5
6
su - ruser #switch to the new user
mkdir ~/.ssh
chmod 700 .ssh
nano .ssh/authorized_keys //create file and insert public key
chmod 600 ~/.ssh/authorized_keys //restrict the permissions
exit //return to the root