WinSCP .NET 库:无需指定 SSH 主机密钥指纹即可连接到 SFTP 服务器 [英] WinSCP .NET library: Connect to SFTP server without specifying SSH host key fingerprint

查看:29
本文介绍了WinSCP .NET 库:无需指定 SSH 主机密钥指纹即可连接到 SFTP 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 WinSCP 的当前稳定版本中,似乎必须使用 SshHostKeyFingerprint 并且没有方法在 SessionOptions 中没有连接到 SFTP 服务器的方法.我可以看到测试版 (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.

无论如何,您可以使用 SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey.

Anyway, you can use use SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey.

虽然不推荐.您应该始终设置SessionOptions.SshHostKeyFingerprint.
了解如何确定 SSH 主机密钥指纹.

另请参阅使用 WinSCP 在 SFTP 或 SCP 中禁止使用主机密钥.

这篇关于WinSCP .NET 库:无需指定 SSH 主机密钥指纹即可连接到 SFTP 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆