WordPress.org

Ready to get started?Download WordPress

Forums

SSH SFTP Updater Support
"Private key incorrect for user" Error (9 posts)

  1. ivec
    Member
    Posted 1 year ago #

    Continue getting the error "The private key for user" is incorrect.

    I generated the RSA key as that user, copied and pasted it into the Private Key box with no success.

    WordPress 3.51
    Debian 6

    Any help would be greatly appreciated!
    If you need any other info, let me know.

    http://wordpress.org/extend/plugins/ssh-sftp-updater-support/

  2. TerraFrost
    Member
    Plugin Author

    Posted 1 year ago #

    Can you login with that private key using a "regular" SSH client? What about from the same IP address?

    I ask about the IP address because there have been several instances where people couldn't. eg.

    http://wordpress.org/support/topic/private-key-incorrect-for-solution?replies=2

  3. ivec
    Member
    Posted 1 year ago #

    Question 1: Why are we posting our private key, not public?

    Question 2: Which user should the ssh key pair be created as?

    We have not install WordPress from the Debian package repository.

  4. TerraFrost
    Member
    Plugin Author

    Posted 1 year ago #

    1. The private key is what you login with. The way it works is you sign a "session identifier" with your private key. The server verifies this signature with the public key it has on file. ie. the public key blob you put in the .ssh/authorized_keys file.

    This plugin requires the private key because it's acting as a client and because it needs to be able to login.

    2. A user that can write to the WordPress files / directory? Could be the user that owns the files or a user in the same group as the owner, assuming the permissions are set appropriately.

    We have not install WordPress from the Debian package repository.

    What does that have to do with anything?

  5. PoorKnight
    Member
    Posted 1 year ago #

    I am getting this same error. If I only use my ssh username/password it tells me the password is wrong. If I use the key I generated (without a pass phrase) it tells me the private key is wrong.

    Private key generated via:
    ssh-keygen (named wpkey, no passphrase)

    wpkey and wpkey.pub created. I add wpkey.pub to .ssh/authorized_keys

    Copy/paste contents of wpkey - error.
    Upload wpkey - error

    I can access the server via SSH (no key reqd).
    I can use SFTP with the username/password. (connects to port 22).

    Any advice?

  6. TerraFrost
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry for the delay - I was out of town.

    Anyway...

    Can you create a sample key that you'd be willing to post?

    Also, if you could get me the logs. You can enable logging by find the following in class-wp-filesystem-ssh2.php and uncommenting it out:

    //define('NET_SFTP_LOGGING', NET_SFTP_LOG_REALTIME);

    Thanks!

  7. TerraFrost
    Member
    Plugin Author

    Posted 1 year ago #

    Actually if you could replace that with this:

    define('NET_SSH2_LOGGING', NET_SSH2_LOG_REALTIME);

    NET_SFTP_LOGGING is more for SFTP connection issues. Auth is done at the SSH layer - not the SFTP layer.

    Thanks!

  8. ELMDesign
    Member
    Posted 11 months ago #

    I'm having the same issue with the server we're on
    I've enabled the logging
    I've also asked the server administrator to create a secondary set of keys without the passphrase

    Am able to connect via SFTP in filezilla with another set of keys
    can you please advise?

  9. TerraFrost
    Member
    Plugin Author

    Posted 11 months ago #

    So if you could find this:

    //define('NET_SFTP_LOGGING', NET_SFTP_LOG_REALTIME);

    And replace it with this:

    define('NET_SSH2_LOGGING', NET_SSH2_LOG_REALTIME);

    That'd be swell.

    Also,

    Am able to connect via SFTP in filezilla with another set of keys

    What about with the set of keys that you're trying to use with this addon?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.