Operating System - HP-UX
1834930 Members
2706 Online
110071 Solutions
New Discussion

Re: Automating SSH logins

 
Andrew Kaplan
Super Advisor

Automating SSH logins

Hi there,

We have a Red Hat Linux 8.0 server that we want to be able to log into an HP-UX 10.20, and HP-UX 11.00 server via SSH. The idea is to have this done automatically.
On the Linux server, the ssh-keygen ap-plication was run as the user account to be used for the connection with the authorized _keys2 file being generated. This file was copied to the user account's home directory on the HP-UX 10.20 machine.
On the HP-UX 10.20 machine, the ssh-keygen -t rsa command was run again as the user account that will be running the ssh connection. The id_rsa keys were created.
The problem that I'm having is this: no matter what I do, whenever I try to run SSH as the user account in question, I am also prompted for the password. The verbose mode readout indicates that SSH is looking for the identity and rsa files in the .ssh directory. They are there. What's going on?!?!?!?
A Journey In The Quest Of Knowledge
5 REPLIES 5
Sridhar Bhaskarla
Honored Contributor

Re: Automating SSH logins

Hi,

You will get more details if you run "sshd" in the debug mode on the server side.

#sshd -d

Then try connecting to this box from the remote system and see what messages scroll down.

This could most probably be the permission issues on the home directory and|or .ssh directory of the user.

Look at your sshd_config file and see if the "strictModes" has been set to yes. If so, then you will have to fix the permissions . It is not recommended to turn off this feature as obviously you are security oriented since you are using ssh.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Automating SSH logins

By the way..

I just wanted to confirm that you ran ssh-keygen on the linux box and copied the keys into the authorized_keys file on the hp-ux server and vice versa.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Automating SSH logins

Here is Chris Vale's guide on doing what you want to do here.

Attached.

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
Chris Vail
Honored Contributor

Re: Automating SSH logins

Check the ownership and permissions as I mentioned in the procedure I wrote, that Stephen Protter posted. They must be exactly chmod 644 and chmod 755. Anything else causes the behavior you mention. Also, use the -t dsa flag instead of the -t rsa flag for the ssh-keygen command.



Stephen--at least spell my name right!


Chris
Steven E. Protter
Exalted Contributor

Re: Automating SSH logins

Okay Chris, I get the message. Unless you've posted ahead of me, I have to rely on malfunctioning pea brain molecules, I'll try and keep it straight.

Sincerely,

Steven

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