windows - 通过批处理文件脚本,主机 key 与WinSCP中的缓存 key 不匹配

标签 windows batch-file ssh winscp

当我尝试使用WinSCP通过某些批处理脚本从其他服务器连接服务器时。

但是,当我看到错误日志时,发现以下消息。

The server's host key does not match the one WinSCP has in cache. This means that either the server administrator has changed the host key, the server presents different key under certain circumstance, or you have actually connected to another computer pretending to be the server.



您能否检查一下为什么我得到此错误,所以请逐步解决此问题。

谢谢,
文卡特什

最佳答案

引用WinSCP documentation:

Warning - Potential security breach!

This message, followed by “The server’s host key does not match the one WinSCP has in cache”, means that WinSCP has connected to the SSH server before, knows what its host key should be, but has found a different one.

This may mean that a malicious attacker has replaced your server with a different one, or has redirected your network connection to their own machine. On the other hand, it may simply mean that the administrator of your server has accidentally changed the key while upgrading the SSH software; this shouldn’t happen but it is unfortunately possible. Another legitimate reason for the host key change is that the address, you are connecting to, load balances to a set of SSH servers. ...

You should contact your server’s administrator and see whether they expect the host key to have changed. If so, verify the new host key in the same way as you would if it was new.

Read more about verifying host keys.



另请参见Verifying the host key or certificate in script

关于windows - 通过批处理文件脚本,主机 key 与WinSCP中的缓存 key 不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51627725/

相关文章:

windows - Windows中Dart代码的怪异行为

windows - 在 Windows 上使用 Hudson 的 Git 插件克隆/获取存储库时出现问题

ssh - Knife SSH 属性不起作用

windows - 批量连接字符串很麻烦

variables - 如何将子字符串命令应用于 XP cmd 脚本中的双百分比变量?

git - Heroku 从哪里获得 RSA key ?它似乎在 ~/.ssh/以外的地方

Java ssh (jsch) 将流设置为 UI 而不是控制台

c++ - 在两个线程中设置两个鼠标钩子(Hook)

windows - 为通过 USB 连接的某些硬件编写游戏 Controller 驱动程序

windows - 从 csv 文件中读取并根据第一列值提取某些数据列