Operating System - HP-UX
1833861 Members
1964 Online
110063 Solutions
New Discussion

SFTP failing and prompted with a password

 
SOLVED
Go to solution
George Li
Occasional Advisor

SFTP failing and prompted with a password

Attempt to sftp to another server which has a public key generated by our server. We get prompted for a password which indcates that there is an issue with the public key. We have tried using the -v parameter for debugging purpose. Can anyone assist with checking the captured steps and advise what could be wrong on the other server, is it the public or something else ? Is there any indications as to what is wrong about the public key ?
8 REPLIES 8
Suraj K Sankari
Honored Contributor
Solution

Re: SFTP failing and prompted with a password

Hi,
It may with the issue with the KEY....

are you able to login into the server without passwd in ssh if not then there is some problem with the key genetate the new key
find the attached doc how to login without passwd via ssh.

Suraj
George Li
Occasional Advisor

Re: SFTP failing and prompted with a password

Suraj

I am unable to open the attachment. can you please email it to georgeli18@gmail.com. Much Appreciated
singh sanjeev
Trusted Contributor

Re: SFTP failing and prompted with a password

IT may be the case that u have a trusted system and expiry set on the account. re-enable the account or set non expiry on the account.

if above is not the case then there would be chance of corrupt public key ..redistribute the key.

Step to distibute the key:

scp -p .ssh/ account@server:/home/account/.ssh/authorized_keys

it will prompt for password first time..thne it will me a password less..connection..
Sanjeev Singh
Matti_Kurkela
Honored Contributor

Re: SFTP failing and prompted with a password

The most common problem with SSH public keys is that the authorized_keys file, the .ssh sub-directory, or the user's home directory is writable by someone other than the user whose home directory it is.

If the file and directory permissions are not restrictive enough, it is possible for other users to create the authorized_keys file to the user's home directory. In this situation, sshd will not trust the authorized_keys file and will behave as if the authorized_keys file did not exist.

The exact reason why a key authentication is rejected is not revealed to the SSH client for security reasons: after all, the client has failed to present any valid identification and might be a malicious intruder.

The rejection reason *is* written in the server-side log: so the correct way to find what is wrong is to contact the administrator of the target server. The administrator should verify the identity of the asker and the legitimacy of the access request, and then give out the information from the logs as necessary.

MK
MK
John Guster
Trusted Contributor

Re: SFTP failing and prompted with a password

what is the permission of the file authorizied_key?
George Li
Occasional Advisor

Re: SFTP failing and prompted with a password

The issue is now resolved. The public key on the receiving server was not saved properly. Thanks all for your advice. I am still trying to find out how to award points. Apology for those who's help have been very enlighting and did not get any points.
Suraj K Sankari
Honored Contributor

Re: SFTP failing and prompted with a password

Hi,
Sorry for late reply mail has been sent to you mail id.

>>I am still trying to find out how to award points.

To know how to assign points please go through the below link

http://forums13.itrc.hp.com/service/forums/helptips.do?admit=109447627+1256027208667+28353475#33

Thanks
Suraj
George Li
Occasional Advisor

Re: SFTP failing and prompted with a password

all points allocated. Thanks again for all the advice. It was a well worth experience.