SSH.NET-找不到合适的身份验证方法 [英] SSH.NET - No suitable authentication method found

查看:86
本文介绍了SSH.NET-找不到合适的身份验证方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我使用SSH.NET的代码

This is my code using SSH.NET

using (var sftp = new SftpClient(host, username, password))
{                
    sftp.Connect();  
}

它可以在我安装在本地计算机上的SFTP上运行,但是当我从客户端将其指向真实的SFTP服务器时,我会收到Renci.SshNet.Common.SshAuthenticationException:未找到合适的身份验证方法来完成身份验证.

It works on a SFTP I installed on my local computer but when I point it at a real SFTP server from a client I get a Renci.SshNet.Common.SshAuthenticationException: No suitable authentication method found to complete authentication.

我找不到有关应该使用哪种身份验证方法的文档,而在File Zilla上,简单的用户名和密码就可以解决问题.

I cannot find any documentation on what authentication methods I should be using and on File Zilla a simple user name and password is doing the trick.

任何人都可以请教吗?

推荐答案

好,所以我的问题的答案是它不是sftp服务器.这是一个简单的ftp服务器,所以我只使用了一个webrequest.

Ok so the answer to my problem is that it wasn't an sftp server. It was a simple ftp server so i just used a webrequest.

首先检查服务器实际上是sftp服务器.

Check the server is actually an sftp server first.

这篇关于SSH.NET-找不到合适的身份验证方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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