Authentication problem with OpenSSH and SSH2-RSA Key Pair

Posted on 2008-11-06
Last Modified: 2012-05-05
Can anyone help me with this issue? Basically, I have a client trying to connect to my SCP server via ssh2-rsa key pair authentication. I've tested the connect from my desktop to the server, no problem, with PuTTy. However the client generated their keypair using OpenSSH. I've installed the key correct, and it looks like things are setup right on their end, but authentication process is still prompting the client for a password even though it recognizes and does not indicate any issue with the private key. Here's the log, I replaced my company's name with [host] and the clients name with [client].
Executing: program /usr/bin/ssh host files.[host].net, user [client]_scp, command scp -v -t upload/
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to files.[host].net [] port 22.
debug1: Connection established.
debug1: identity file [host] type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'files.[host].net' is known and matches the RSA host key.
debug1: Found key in /home/[client]/.ssh/known_hosts:12
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: [host]
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
[client]_scp@files.[host].net's password:
Question by:silentguy
    LVL 68

    Expert Comment

    Are the permissions on the client side correct? (600 for the private key)
    LVL 43

    Expert Comment

    Not only key has to be 0600, but also $HOME must not be writable by anyone but owner, and $HOME/.ssh should be 0700 as well.

    Author Comment

    Thanks for tips guys. The client has verified that the permissions are set correctly on their side and I've verified the correct permissions are set on my end. Unfortunately, it's still a no go. What's strange is that the log *seems* to indicate that there is no issue with the key pair itself. It just keeps asking for the password. Is there something specific that needs to be configured on the OpenSSH client side?
    LVL 68

    Accepted Solution

    did you generate and try the dsa keys (option -i [idfile])  or the version 1 keys (option -1)?
    I know, your debug listing above doesn't indicate that there could be a problem, it's just to make the picture complete.


    LVL 68

    Expert Comment

    Another thing:
    I've seen more than once that people simply copy and paste keys into their keyring files, not recognizing the eventually inserted LF.
    Just one more place to look at.
    And, it's not only file permissions, but also file ownership ...
    LVL 16

    Assisted Solution

    If you are asked for a password and, after you typed, you are allowed to connect it means you gave a pass during the process of creation. Setup again the keys without typing passwords and it will not ask you

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Microsoft EFS has gone through a few changes over the years, depending on the OS you're trying to recover EFS data from you may have to use different tactics. Overall however 3rd party recovery solutions like that of Passware or Elcomsoft's AEFSDR m…
    As a financial services provider, your business is impacted by two of the strictest federal regulations on record: the Sarbanes-Oxley Act and the Gramm-Leach-Bliley Act. Correctly implementing faxing into your organization to provide secure, real-ti…
    Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now