Operating System - Linux
1846860 Members
21770 Online
110256 Solutions
New Discussion

Can Automate SFTP from HP to HP o.k....but HP to Linux still asking for password

 
Steve_615
Occasional Advisor

Can Automate SFTP from HP to HP o.k....but HP to Linux still asking for password

To all:

I was able to automate SFTP from HP-UX to HP-UX, so that I go straight through to the sftp prompt without entering a password

However, following the same configuration procedure for the Linux (2.6.9 GNU/Linux) server that another client is on, does not remove the need for a password. Is there some other steps that need to be taken in order for HP-UX to Linux SFTP to be automated.

Thanks,

Steve
5 REPLIES 5
RAC_1
Honored Contributor

Re: Can Automate SFTP from HP to HP o.k....but HP to Linux still asking for password

Same reply as gievn in hp-ux forum.

Stop the running sshd on linux box. Now just do /usr/sbin/sshd -ddd and now from hp-ux machine try to to sftp.
Do sftp -vvv "linux_box"
Post the outputs.
There is no substitute to HARDWORK
Dave Falloon
Trusted Contributor

Re: Can Automate SFTP from HP to HP o.k....but HP to Linux still asking for password

Is it asking for a password like this:

bofh:~# ssh dave@pfy
Password:

Or is it asking for a passphrase like this:

bofh:~/.ssh# ssh dave@pfy
Enter passphrase for key '/root/.ssh/id_dsa':

--Dave
Clothes make the man, Naked people have little to no effect on society
Steve_615
Occasional Advisor

Re: Can Automate SFTP from HP to HP o.k....but HP to Linux still asking for password

When I ran the ssh-keygen I gave it an empty passphrase. So, it is now requesting a "password" each time.
Dave Falloon
Trusted Contributor

Re: Can Automate SFTP from HP to HP o.k....but HP to Linux still asking for password

your public key and authorized_keys/authorized_keys2 files are all the same and have chmod 700 attribs in the .ssh folder of the user thats trying to connect?

ie. as user dave on the server you are connecting to:
cat --show-all ~/.ssh/authorized*

will print the exact same characters as this command run on the machine you are connecting from:

as user dave:
cat -A ~/.ssh/id_[rd]sa.pub

This command will show the contents of both the rsa public key and dsa pub key. You probably want to go with dsa keys ( ssh-keygen -t dsa ), they have less support issues. If everything is correct with the proper permissions then your sshd_config isn't allowing public key authentication.

--Dave

Clothes make the man, Naked people have little to no effect on society
Steven E. Protter
Exalted Contributor

Re: Can Automate SFTP from HP to HP o.k....but HP to Linux still asking for password

Most common cause of problems in this area is permissions on the .ssh/ directory and components.

Check the permissions of all needed files on HP-UX and make sure the Linux permissions match and you will get it working.

I'm doing it in a mixed environment right now, so I'm certain it will 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