By cansurmeli
Hello.
I’m on CentOS 7 with a LAMP stack.
I’ve a Wordpress installation which I’m trying to enable it to perform updates and installations via SSH. I’ve followed this tutorial from Digital Ocean which I’ve performed every step and more than double checked.
The problem is that whatever I’ve tried, I keep getting the error Public and Private keys incorrect for wp-user when I try to update a plugin or install a theme.
A minor difference than the tutorial I’ve followed: the tutorial didn’t gave a password for the specific Wordpress user but I did. I read somewhere that it might fail because of that.
Also as you can see as well, the tutorial goes on Ubuntu. The packages I’ve installed instead are(tutorial package > my installed package):
Using sudo pecl install -f ssh2 gives the following:
PHP Warning: Module 'ssh2' already loaded in Unknown on line 0 downloading ssh2-0.12.tgz ... Starting to download ssh2-0.12.tgz (26,223 bytes) .........done: 26,223 bytes ERROR: pecl.php.net/ssh2 not installed
Can you please help me debug?
P.S. I’ve also asked the question here which hasn’t been answered yet but a user commented some on it although it wasn’t really helpful. I’m just sharing it as a heads-up.
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!
Glad you solved it, however did you really solve it? I always wonder when disabling things such as you have, what the real impact is. If you were being told that the key was incorrect then it’s highly likely that the key was actually incorrect no? I have noticed many times all across the internet that people often have issues when it comes to public/private key usage and often these problems stem from incorrect formatting… a great example of this can be DKIM keys and SSH keys… often at key creation, there is some extra text added which needs to be removed to eventually end up with the correct format. Just a random thought… don’t pay it too much attention.
I solved it! Finally after a lot of frustrating days.
In the tutorial page, deep down in the comments, someone suggested removing/commenting the following line:
define('FTP_PRIKEY','/home/wp-user/<my_RSA_key>');
I did this and immediately the error message disappeared and things started getting updated.
This comment has been deleted
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.