Reputation: 77
I use SSH keys in my wp-config since a long time. Updates, plugin installation and removal, all worked well. After the last apt-get update wp is asking for the FTP password when I try to install for example a plugin. There was no change done to the wp installation nor the file or directory permissions. I did not update wp either.
define('FTP_PUBKEY','/home/wp-user/wp_rsa.pub');
define('FTP_PRIKEY','/home/wp-user/wp_rsa');
define('FTP_USER','wp-user'); define('FTP_PASS','');
define('FTP_HOST','127.0.0.1:22');
Ubuntu 14.04 WORDPRESS VERSION: 4.7.6
PHP VERSION: 5.5.9-1ubuntu4.22
WEB SERVER INFO: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f
EDIT:
I added below to my wp-config to see if it changes something.
define('FS_METHOD', 'ssh2');
No I'm getting a different error message in the WP backend: The ssh2 PHP extension is not available
...but ssh2 is installed and loaded:
# php -m |grep ssh2
ssh2
Upvotes: 1
Views: 4375
Reputation: 77
Seems to be a bug in libssh2-php... https://bugs.launchpad.net/ubuntu/+source/php-ssh2/+bug/1617294
Installing the WP plugin below allows me again to install/update as before.
https://en-ca.wordpress.org/plugins/ssh-sftp-updater-support/#description
Upvotes: 1