string command = Command.Text;
StringBuilder result = new StringBuilder();
try
{
var connectionInfo = new KeyboardInteractiveConnectionInfo(server, port, username); connectionInfo.AuthenticationPrompt += delegate(object sender1, AuthenticationPromptEventArgs e2)
{
foreach (var prompt in e2.Prompts)
{
if (prompt.Request.Equals("Password: ", StringComparison.InvariantCultureIgnoreCase))
{
prompt.Response = password;
}
}
}; using (var client = new SshClient(connectionInfo))
{
try
{
client.Connect();
result.Append(client.RunCommand(command).Execute() + "\r\n");
QAResult.Text = result.ToString();
client.Disconnect();
}
catch (Exception e1)
{
result.Append(e1.Message + "\r\n");
QAResult.Text = result.ToString();
}
}
}
catch (Exception e1)
{
result.Append(e1.Message + "\r\n");
QAResult.Text = result.ToString();
}

No suitable authentication method found to complete authentication (publickey,keyboard-interactive).的更多相关文章

  1. Network authentication method and device for implementing the same

    A network authentication method is to be implemented using a network authentication device and a use ...

  2. PHP错误:SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

    使用PHP连接MySQL 8的时候,可能会发生如标题所示的错误: SQLSTATE[HY000] [2054] The server requested authentication method u ...

  3. mysql 8.0 错误The server requested authentication method unknown to the client

    mysql 安装了最新版本8.0.11后创建用户并授权后,授权的用户连接数据库提示 The server requested authentication method unknown to the ...

  4. PHP连接mysql8.0出错“SQLSTATE[HY000] [2054] The server requested authentication method unkno…

    今天安装安装一个叫得推校园O2O系统的使劲都说连接不上服务器. 下面是安装说明,我直接进行3步骤,导入数据库配置文件,结果就显示题目报错的内容 安装说明: 直接输入程序目录即可 http://loca ...

  5. mysql8.0:SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

    忽然注意到的情况: 2018/7/19至2018/9/13之间发布的7.1.20.7.1.21.7.1.22和7.2.8.7.2.9.7.2.10这六个版本提供的对caching_sha2_passw ...

  6. Laravel - 解决连接MySQL时报"The server requested authentication method unknown to the client”错误

    2019-04-12发布:hangge阅读:934   1,问题描述 最近建了个 Laravel 项目,当配置好 MySQL 数据库进行请求时,页面报如下错误:   SQLSTATE[HY000] [ ...

  7. php7.3连接MySQL8.0报错 PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]

    报的错误: In Connection.php line : SQLSTATE[HY000] [] The server requested authentication method unknown ...

  8. [转]OData and Authentication – Part 6 – Custom Basic Authentication

    本文转自:https://blogs.msdn.microsoft.com/astoriateam/2010/07/21/odata-and-authentication-part-6-custom- ...

  9. Atitit HTTP 认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结

    Atitit HTTP认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结 1.1. 最广泛使用的是基本验证 ( ...

随机推荐

  1. Qt5如何设置静态编译,解决生成的可执行文件打开出错问题

    将https://yunpan.cn/cqGGURjmG2fEY  访问密码 8de5  中的压缩包Qt5-MSVC-Static-master.zip 解压到你的qt安装目录,一般就是C:\Qt下, ...

  2. Oracle错误问题---- 《ora-12638:身份证明检索失败》

    使用客户端可以连接,但只有一个站点出现此问题,非常郁闷,网上查了一下,发现是用户认证问题,解决办法如下: 在ORACLE客户端目录下 NETWORK/ADMIN下的sqlnet.ora,使用记事本打开 ...

  3. php把数组保存成文件格式

    php把数组保存为文件格式的函数实例,或许有的还没听说过可以把数组保存成文件,其实这样做也是另有它用的,两种方法各有千秋,有兴趣的PHP爱好者敬请参阅: $file="./cache/fil ...

  4. ubuntu下 使用AB做压力测试

    1最近刚开始接触apache大数据下数据优化,讲一下apache 下ab压力测试工具. 程序“ab”尚未安装. 您可以使用以下命令安装: apt-get install apache2-utils 以 ...

  5. Ubuntu等Linux系统清除DNS缓存的方法

    buntu等Linux系统清除DNS缓存的方法 直接说方法: 如果系统下有nscd,那么就直接 sudo /etc/init.d/nscd restart 如果没有也没关系,网上接受的方法大都是 su ...

  6. C#7.0

    C#7.0中有哪些新特性? 以下将是 C# 7.0 中所有计划的语言特性的描述.随着 Visual Studio “15” Preview 4 版本的发布,这些特性中的大部分将活跃起来.现在是时候来展 ...

  7. 三分钟PJ隐藏SSID无线网络

    一般来说用户可以通过路由或主机设置来隐藏无线信号的SSID网络信息,在这种情况下我们使用XP系统自带的无线信号扫描工具将看不到该无线网络的踪影,在这种情况下XP系统无线信号管理工具只能够看到将SSID ...

  8. Entity Framewor 学习笔记 (include + where)

    如果我们想在子查询做过滤的话应该怎样写呢? IEnumerable<Product> products = db.products.Include(p => p.colors.Whe ...

  9. ASM-51汇编出错信息表

    1  Address Out of Range 一个被计值的目标地址超出了当前语句的范围.2 Badly Formed Argument 数字规定的类型中有非法数字存在.3 Illefal Equal ...

  10. 设计模式(七):Adapter 适配器模式 -- 结构型模式

    1. 概述: 接口的改变,是一个需要程序员们必须(虽然很不情愿)接受和处理的普遍问题.程序提供者们修改他们的代码;系统库被修正;各种程序语言以及相关库的发展和进化.  例子1:iphone4,你即可以 ...