Results 1 to 4 of 4
Hi,
How to login through ssh command without entering root password? what will be the command to login without root password
Regards
Gulam navi...
- 08-03-2011 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 7
ssh remote machine without root password?
Hi,
How to login through ssh command without entering root password? what will be the command to login without root password
Regards
Gulam navi
- 08-03-2011 #2
Search google for "ssh authorized_keys"
Also, imho it is not encouraged to log in as root, because
a) You loose information who actually logged in. Can be anyone with the root credentials.
In contrast: If root login is disabled, then there is first a user login, that then may be escalated.
b) An attacker would only need one token instead of two to get root
c) the possible impact of remote comands is limited, if a regular user is used.You must always face the curtain with a bow.
- 08-04-2011 #3Just Joined!
- Join Date
- Jul 2011
- Posts
- 1
here are the instruction to login without password:
ssh-keygen # to generate a pair of keys
place the content of id_dsa.pub into the file /root/.ssh/authorized_keys (on the remote server). Also, run chmod 700 /root/.ssh/authorized_keys, to be sure that other users cannot see it.
The path /root/.ssh may not exists. In this case, just create the .ssh path first.
when you run ssh root@remote-server, the server ssh will verify the file /root/.ssh/authorized_keys to see if it can allow the login without password.
There is some cool trick you can do with ssh on this post diogomelo.net/blog/09/ssh-tricks . Have fun
- 08-05-2011 #4Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
This has been made trivial to do with the ssh-copy-id script, which should be included with your OpenSSH package.
Also, don't forget to set PermitRootLogin to yes in /etc/ssh/sshd_config (and restart the daemon).


Reply With Quote
