Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有很多关于使用 SharpSSH 组件的文章,但我仍然想问这个问题,因为我无法从网上和 stacko 上的大量文章和博客文章中找到答案。我收到如下错误:
“拒绝主机密钥:本地主机”
发现一篇文章说将信任设置为“true”(我相信这可能是帮助我连接到远程 SSH 服务器的最后一条线索,因为许多人承认该解决方案解决了他们的问题)但是你如何在 SharpSSH 中做到这一点?
你们能帮我解决这个问题吗?谢谢。
找到了解决方案。以下是我添加的内容:
Hashtable config = new Hashtable(); config.Add("StrictHostKeyChecking", "no"); SFTPSession.setConfig(config);