View Single Post
Old 13th November 2011
amrogers3 amrogers3 is offline
Port Guard
 
Join Date: Oct 2011
Posts: 20
Default

Quote:
Originally Posted by J65nko View Post
If you want to ssh/login to the root account of the server, the public key has to be in the "root's" home directory. On most systems this will be "/root/.ssh".

You did :
That should have been:
Code:
mv /id_rsa.pub /root/.ssh/authorized_keys

Of course, this will wipe out an already existing authorized_keysSo this is not so smart if there already is such a file.
Spot on, that worked! Thank you J65nko! So the key has to be in the home folder of the user you are trying to connect with. Got it.

Okay so now I have to enter a password for the private key so I can connect. Next step is I would like to be able to connect with no password.

I am not noticing the same behavior as your example:
Code:
The authenticity of host '192.168.222.44 (192.168.222.44)' can't be established.
RSA key fingerprint is 1a:1f:ab:96:c7:ad:1a:3f:9c:e8:2d:73:0f:28:98:07.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.222.44' (RSA) to the list of known hosts.
j65nko@192.168.222.44's password: .......
I type
Code:
$ssh root@192.168.1.2
and I am asked for a password and then logged onto server, no further text is displayed.
Reply With Quote