Operating System - HP-UX
1833379 Members
3483 Online
110052 Solutions
New Discussion

Re: How can i trust a server to itself using Secure Shell

 
Silver_1
Regular Advisor

How can i trust a server to itself using Secure Shell

All,

I have an hp admin server (hpadmin01) and hpprod01 hpprod02 hpprod03 etc are trusted only to the hpadmin01 server.

Now my problem is that if i am logged in as root to hpprod01 and do "ssh hpprod01" it asks for the password.

On the other hand if login to hpprod03 and do "ssh hpprod03", it doen't asks for the password.

I cannot see any difference in the configuration files.

Do anybody out there have an idea ?

Tx,
Nair

4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: How can i trust a server to itself using Secure Shell

It is the permissions on the files in /root/.ssh and of that folder itself.

If you want password free access between the systems you have a number of options:

1) Come to HP World in August, I'm giving a class on the topic.
2) make the permissions on the file and folders in /root/.ssh the same as the server that allows password free access. You will also need to make sure you generated and distributed a public key using the ssh-keygen command. There are hundreds of posts with my name on them that include a word do that makes the whole process very simple.

3) If you wish to disable password free access, remove the file /root/.ssh/authorized_keys

My root home is /root/

You need to use your actual root home to make this work.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Silver_1
Regular Advisor

Re: How can i trust a server to itself using Secure Shell

Hi Steve,
I do have the home of root as /root.

Permissions:

On working system, which can do an ssh to itself:

drwx------ 2 root sys 8192 Dec 6 11:19 .ssh/

Inside the directory .ssh

drwx------ 2 root sys 8192 Dec 6 11:19 ./
drwx------ 8 root sys 8192 May 12 11:34 ../
-rw-r----- 1 root sys 5154 Feb 6 22:11 authorized_keys2
-rw------- 1 root sys 672 Nov 23 15:31 id_dsa
-rw-r----- 1 root sys 603 Nov 23 15:31 id_dsa.pub
-rw------- 1 root sys 883 Nov 23 15:31 id_rsa
-rw-r----- 1 root sys 223 Nov 23 15:31 id_rsa.pub
-rw------- 1 root sys 4167 Apr 26 13:47 known_hosts
-rw------- 1 root root 1024 Apr 11 19:30 prng_seed


The system which has probelms:

drwx------ 2 root sys 8192 Aug 2 2004 .ssh/

Inside the directries.

drwx------ 2 root sys 8192 Aug 2 2004 ./
drwxr-x--- 8 root sys 8192 May 12 11:33 ../
-rw-r----- 1 root sys 5154 Feb 6 22:11 authorized_keys2
-rw-r----- 1 root sys 3504 May 12 2004 authorized_keys2.old
-rw------- 1 root sys 5561 Apr 20 16:49 known_hosts
-rw------- 1 root sys 1024 May 12 11:42 prng_seed

Thanks,
Nair
Uday_S_Ankolekar
Honored Contributor

Re: How can i trust a server to itself using Secure Shell

It may be due to a wrong authorised key file ssh works mainly with this authenticated key file.
create a new authorized key file with ssh-keygen and destribute
do a man on ssh-keygen for more info

-USA..
Good Luck..
Silver_1
Regular Advisor

Re: How can i trust a server to itself using Secure Shell

Hi,

I just given this command and it has solved my probelm.

cat id_rsa.pub id_dsa.pub >> authorized_keys2

Tx,
Nair