can anyone help me


install at located home/user/wordpress

keys located at

getting incorrect keys

keys permissons 600, 600 folfer 755

2 Answers 2


For connection through ssh, you have to specify the ssh user using FTP_USER

define( 'FS_METHOD', 'ssh' );
define( 'FTP_BASE', '/home/user/wordpress' );
define( 'FTP_PUBKEY', '/home/user/.ssh/id_rsa.pub' );
define( 'FTP_PRIKEY', '/home/user/.ssh/id_rsa' );
define( 'FTP_USER', 'user' );
define( 'FTP_HOST', 'localhost:22' );

I think you also need to define FTP_BASE.

You also need to enable ssh upgrade access. From the Codex:

Enabling SSH Upgrade Access

There are two ways to upgrade using SSH2.

The first is to use the SSH SFTP Updater Support plugin. The second is to use the built-in SSH2 upgrader, which requires the pecl SSH2 extension be installed.

To install the pecl SSH2 extension you will need to issue a command similar to the following or talk to your web hosting provider to get this installed:

pecl install ssh2

After installing the pecl ssh2 extension you will need to modify your php configuration to automatically load this extension.

pecl is provided by the pear package in most linux distributions. To install pecl in Redhat/Fedora/CentOS:

yum -y install php-pear

To install pecl in Debian/Ubuntu:

apt-get install php-pear

It is recommended to use a private key that is not pass-phrase protected. There have been numerous reports that pass phrase protected private keys do not work properly. If you decide to try a pass phrase protected private key you will need to enter the pass phrase for the private key as FTP_PASS, or entering it in the "Password" field in the presented credential field when installing updates.

  • SSH2 extensions installed. and newest version. server run user & group is www-data my directory owned another user & group. is there any issue? Commented Dec 27, 2016 at 10:51

I asked this question when i am newbie. But finally realized no need to setup ssh and sftp even ftp account for wordpres when you are using in vps or cloud.

I have used sftp client to file transfer. But some plugins installation not worked due to ownership problems. I have changed permission to Apache user and group www-data .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.