WinSCP .NET库:在不指定SSH主机密钥指纹的情况下连接到SFTP服务器 [英] WinSCP .NET library: Connect to SFTP server without specifying SSH host key fingerprint
问题描述
在WinSCP的当前稳定版本中,似乎必须使用SshHostKeyFingerprint
,并且如果没有SessionOptions
中的连接,则无法连接到SFTP服务器.我可以看到绕过测试的功能已添加到Beta(5.2)中,但我想知道是否可以在没有此指纹的情况下进行连接.
In the current stable release of WinSCP, it seems that using SshHostKeyFingerprint
is mandatory and there are no ways to connect to SFTP server without that in SessionOptions
. I can see that the ability to bypass is added to the beta (5.2) but I was wondering whether or not it's possible to connect without this fingerprint.
推荐答案
首先,当您尝试绕过SSH主机密钥检查时,请确保您了解放弃了任何安全性.您实际上失去了对中间人攻击的保护
First, make sure you understand that you give-up any security, when you try to bypass SSH host key check. You effectively lose a protection against man-in-the-middle attacks.
无论如何,您都可以使用use SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey
.
Anyway, you can use use SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey
.
不过不建议这样做.您应该始终设置SessionOptions.SshHostKeyFingerprint
.
了解如何确定SSH主机密钥指纹.
It's NOT recommended though. You should always set SessionOptions.SshHostKeyFingerprint
.
Learn how to determine SSH host key fingerprint.
这篇关于WinSCP .NET库:在不指定SSH主机密钥指纹的情况下连接到SFTP服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!