LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh without password from user to root on same linux enterprise 5 machine (http://www.linuxquestions.org/questions/linux-newbie-8/ssh-without-password-from-user-to-root-on-same-linux-enterprise-5-machine-783969/)

linux2010 01-22-2010 04:12 AM

ssh without password from user to root on same linux enterprise 5 machine
 
hi

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.

thanks

Agrouf 01-22-2010 04:43 AM

1/ Be sure the access rights of ~/.ssh are 600
2/ start ssh-agent
3/ add the key you created with ssh-add

druuna 01-22-2010 05:20 AM

Hi,

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.

chrism01 01-24-2010 06:57 PM

If it's on the same machine, avoid creating that security hole; use sudo instead.


All times are GMT -5. The time now is 07:33 AM.