If when using your SFTP client on WP Engine, you receive a warning that your “host keys do not match” or “host key changed”, you will need to update host keys stored on your local machine.
Option 1: Update Host Key
Option one in this scenario is to manually update your host key. This method generates the new host key and connects you to your host:
environment.sftp.wpengine.com. This is the easiest, recommended method. Please keep in mind these steps need to be taken on the local computer where you are experiencing this issue.
Update Host Key on Mac/Linux
Run the following command in a local Terminal window, where
environment is the name of your WP Engine environment:
ssh-keygen -R environment.sftp.wpengine.com:2222
Option 2: Delete All Host Keys
Option two in this scenario is to delete the host key entry for your host:
Delete Host Key on Mac/Linux
To delete your local host key, you just need to remove your
known_hosts file. Open terminal and run the following commands:
Update Host Key on Windows
To update your local host key on a Windows machine, open up PuTTY and perform the following steps:
- Open up
regedit.exeby doing a search
- Navigate to
- Delete all keys listed
Option 3: Update known_hosts file
Similar to removing removing all known hosts in Option 2, this option removes just one known host.
The warning message your SFTP client shows will usually list the line in known_hosts that is triggering this message, so be sure to make a note of this.
Update known_hosts file on Mac/Linux
On Mac/Linux you can simply edit the file using
vi, which is a text editor. Run the following commands. Be sure to update
100 to the line number your error message displays.
vi known_hosts +100
Once the file opens to this line:
- Type the key
dtwice to remove the line
Update known_hosts file on Windows
On a Windows machine using PuTTY, go to the Registry folder just like in step two. In that directory, a list of hostnames appears. Right click on the
environment.sftp.wpengine.com one, and then select Delete.