在 Navicat 中一个现有的连接到远程数据库的 SSH > Host 字段使用域名工作。在建立一个新的远程服务器并将域指向新的 IP 地址(并设置数据库和用户,以及将你的公共 RSA 密钥添加到新服务器)后,Navicat 不信任来自服务器的密钥散列。替换在 ~/.ssh/known_hosts
无济于事。
The server key has changed. Either you are under attack or the administrator changed the key.
New server key hash:...
如何让 Navicat 接受新的 known_hosts 数据和授权连接?
Navicat 使用了一个不同于操作系统的 known_hosts 文件。所以更新 ~.sshknown_hosts 并不影响 Navicat 连接到远程服务器。
sudo find ~ -name known_hosts
/Users/<user>/Library/Containers/com.prect.NavicatEssentialsForPostgreSQL12/Data/.ssh/known_hosts
Access denied for 'publickey'. Authentication that can continue: publickey,password (101203)
或类似,检查验证方法选择,如果你使用'公钥'或'密码和公钥',点击'私钥'文件导航器并重新选择一个与你添加到远程服务器的公钥匹配的私钥。