UPDATE Feb 2022: this issue may have been fixed in more recent versions. See comments on the accepted solution.
Summary:
An existing connection to a remote database in Navicat was working using a domain name for the SSH > Host field. After building a new remote server and pointing the domain at the new IP address (and setting up the database and users, as well as adding your public RSA key to the new server), Navicat doesn't trust the key hash from the server. Replacing the entries in ~/.ssh/known_hosts
doesn't help.
Steps to reproduce:
- point the domain for a remote database at a new IP address
- add your RSA public key to the authorized keys on the remote server
- add the remote database and users on the remote server
- in Terminal, ssh into the new remote server using the domain, and follow the prompts to add the new server to the known_hosts file
- in Navicat (specifically Navicat Essentials for PostGreSQL, but this issue will apply to any app in the Navicat suite on Mac) edit an existing connection to the remote server
- on the SSH tab in the "Edit Connection..." window, click 'Test Connection'
Expected:
- Navicat uses the updated ~/.ssh/known_hosts file to authorize connection to the remote server
Actual:
- Navicat fails to connect
Error:
The server key has changed. Either you are under attack or the administrator changed the key.
New server key hash:...
Question:
How to get Navicat to accept the new known_hosts data and authorize the connection?