Generating a new SSH key for SFTP access¶
1. Generate your SSH key¶
Open a terminal window and run the
ssh-keygen command with default values for all options.
$ ssh-keygen -t rsa
2. Locate your new public and private SSH key files¶
You should now have two files,
id_rsa (private key) and
id_rsa.pub (public key) in your
/home/<username>/.ssh directory (where
<username> is your user name).
3. Add your SSH public key to wpcontroller¶
In "Create SFTP user" (Sites -> example.com -> SFTP) add the contents of the public key file
id_rsa.pub for the user.
4. Run WP-CLI commands¶
With an SFTP client like FileZilla or CyberDuck, use the private key file
id_rsa, host, and username to create a new connection in the Site Manager.