If when using your SFTP client on WP Engine, you receive a warning that your “host keys do not match” or that your host keys have changed since your last connection, it’s possible you may need to update host keys stored on your local machine. In this article we’ll guide you through how to update host keys or delete them locally to help resolve this error message.
Option 1: Update Host KeyS
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 (INSTALL.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
To update your local host key on a Mac or Linux machine, run the following command in a local Terminal window, where HOSTNAME is your INSTALL.sftp.wpengine.com host:
cd ~/.ssh ssh-keygen -R [HOSTNAME]:2222
Option 2: Delete Host KeyS
Option two in this scenario is to delete the host key entry for your host (INSTALL.sftp.wpengine.com)
Delete Host Key on Mac/Linux
To delete your local host key, you just need to remove your “known_hosts” file, which you can do using the following command in your local Terminal window:
cd ~/.ssh rm known_hosts
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.exe’ by doing a search.
- Navigate to HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys
- Delete all keys in there or delete the individual host key.
Option 3: Update known_hosts file
Option three is similar to the second one, but instead of removing all known hosts we are just removing the one known host that has changed from the file. 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. Use the following command, where “100” is the line number your error message displays.
cd ~/.ssh vi known_hosts +100
Once the file opens to this line, just type the key ‘d’ twice to remove the line, then type ‘:x’ to save.
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 INSTALL.sftp.wpengine.com one, and then select ‘Delete’.