By rick741284
I followed the instructions for setting up SSH to the letter, even using the same username as wp-user.
When I try to install a plugin, it comes up with “Public and Private keys incorrect for wp-user”
I generated the key pair several times. Same problem!
When it didn’t work after several regens, I decided to generate my own using puTTY and then uploaded it to the /home/wp-user directory as wp_rsa, wp_rsa.pub.
In the Wordpress Connection Information page, it shows the following:
Hostname 127.0.0.1:22
FTP/SSH Username wp-user
FTP/SSH Password … (I did not give wp-user a password as instructed not to)
Authentication Keys
Public Key: /home/wp-user/wp_rsa.pub
Private Key: /home/wp-user/wp_rsa
Connection Type SSH2
==================
I’ve been at this from morning to now evening. Frustrating.
Anyone have any idea why this isn’t working? TIA.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
As mentioned, setting the entire wordpress path to www-data:www-data is insecure. At the minimum, you can get this to work by just setting wp-admin/includes/file.php permissions to www-data:www-data
This question was answered by @rick741284:
SOLVED!!!
I’m posting this here so that if someone else has this frustrating problem this might solve it.
Here is what I found:
Try to give www-data permission in wordpress directory:
cd /yourwordpress_dir/ sudo chown -R www-data:www-data *
In my case, I had to cd /var/www/html and then sudo chown -R www-data:www-data *
:-)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.