Operating System - HP-UX
1834148 Members
2554 Online
110064 Solutions
New Discussion

Re: sftp without password

 
SOLVED
Go to solution
Boissé_1
Advisor

sftp without password

Hi,

I have installed ssh on 2 hpux server.
I have generated a key pairs, copied the public one into the authorized_keys host file but the password is still needed.

All parameters are on default value.

What's the problem ?

Thanks
6 REPLIES 6
RAC_1
Honored Contributor

Re: sftp without password

Check configuration files. sshd.config and ssh.conf. There is a setting that defins preferred way authentication.

Also what is the error message. You can details as follows.

ssh -vvv "other_server"

Anil
There is no substitute to HARDWORK
Mel Burslan
Honored Contributor

Re: sftp without password

we do this all the time with scp not sftp and it works like a charm without requiring the password. Provided you got the correct keys in correct places in the right format.

The most common mistake I have seen so far is the line breaks in the the public or private ssh keys. Make sure everything is on one single line not broken up over several lines on either side.
________________________________
UNIX because I majored in cryptology...
Daryn Clark
New Member
Solution

Re: sftp without password

For the user that your using to SSH or SCP as, ensure that "~/.ssh/authorization_keys" are owned by that user and the permissions of both are 750. If its the root user, ensure that PermitRootLogin is allowed in sshd_config.
Gopi Sekar
Honored Contributor

Re: sftp without password


one more thing, if you are using protocol 2 of SSH (which is the default protocol) then I believe the public key file is expected by the name authorized_keys2 and the private key file name should be id_rsa/id_dsa depending on type of key.

Try making this change and see whether it is helpful also check the file permission of private/public key files they are supposed to be only user readable

Regards,
Gopi
Never Never Never Giveup
David Child_1
Honored Contributor

Re: sftp without password

The most common problem I have found that causes this issue is;

(Note: these items are all on the host you are trying to connect to)

1. permissions of the user's .ssh directory (I always use 700)
2. permissions of the user's authorized_keys file (I always use 600)
3. pemissions of the user's home directory (755 or 750 should be fine)

To get a good idea of what is going on run;
in this example we are trying to connect from hostA to hostB.

hostB# /opt/ssh/sbin/sshd -ddd
hostA# ssh -vvv hostB

You will probably get the most information from the output at hostB. It should point you to your problem.
Boissé_1
Advisor

Re: sftp without password

Thanks