Wordpress SSH / SFTP Access

Hi, there

I'm not sure what I've done wrong, but for some reason SFTP (note: not FTPS) is no longer working on my Wordpress blog. I type in the locations to the public and private keys, but it gives me this error: "Public and Private keys incorrect for [USERNAME]" where [USERNAME] is the user I'm logging in as.

I have disabled password logins to SSH, and enabling them has not worked either, resulting in an incorrect password error. It's very strange. This was working fine the last time I tried it, but no longer is. Perhaps my user doesn't have access to the .ssh directory? - If that's the case, how would I give it such access?

I have also tried logging in as root (and also permitting root login, as I had that disabled originally), and this also hasn't worked.

The keys are definitely, 100% correct, as I have copies on my local machine and they're identical.

I've tried chown and chmod, but to no avail.

Any ideas? Perhaps a guide to setting SSH up (I'm using libssh2) for Wordpress would be helpful. I cannot find the one I originally read online. I am running the latest version of Debian and Wordpress on Apache which is routed via Nginx.

Again, it used to work fine. The only thing that I can think of is when I deleted my user about a month ago and created it again from scratch after trying to limit SSH access to only the /srv/www/ directory.

Thanks in advance.

2 Replies

@Xengine:

… The only thing that I can think of is when I deleted my user about a month ago and created it again from scratch…
Check the permissions on your .ssh directory (should be rwx–---- [chmod 700]) and on your authorized_keys file (should be rw–----- [chmod 600]).

@pclissold:

@Xengine:

… The only thing that I can think of is when I deleted my user about a month ago and created it again from scratch…
Check the permissions on your .ssh directory (should be rwx–---- [chmod 700]) and on your authorized_keys file (should be rw–----- [chmod 600]).

I have tried this just now and it unfortunately does not work. I still receive the "Public and Private keys incorrect" error.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct