ssh without password from user to root on same linux enterprise 5 machine
my application is installed on root of RH enterprise 5 and is run via user on the same machine. This need ssh without password from the user.
i do the following :
1. run ssh-keygen in .ssh directory of the user.
2. copy the id_rsa.pub as the authorized-keys in the root's .ssh directory
3 chmod 600 to the authorized_keys
4.restart the machine
5. login from the user and ssh SER ( SER is the entry in the /etc/hosts with the ip address of the machine)
6 It still prompt for the password
plz suggest me how can i ssh from the user to the machine without password.
1/ Be sure the access rights of ~/.ssh are 600
2/ start ssh-agent
3/ add the key you created with ssh-add
Also check to see if PermitRootLogin is enabled. This is, seen from a security point of view, a bad idea, but you do need it to solve your problem.
PermitRootLogin can be found/set in /etc/ssh/sshd_config
Hope this helps.
If it's on the same machine, avoid creating that security hole; use sudo instead.
|All times are GMT -5. The time now is 02:58 AM.|