No suitable authentication method found to complete authentication (publickey,keyboard-interactive).
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).的更多相关文章
- 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 ...
- 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 ...
- mysql 8.0 错误The server requested authentication method unknown to the client
mysql 安装了最新版本8.0.11后创建用户并授权后,授权的用户连接数据库提示 The server requested authentication method unknown to the ...
- PHP连接mysql8.0出错“SQLSTATE[HY000] [2054] The server requested authentication method unkno…
今天安装安装一个叫得推校园O2O系统的使劲都说连接不上服务器. 下面是安装说明,我直接进行3步骤,导入数据库配置文件,结果就显示题目报错的内容 安装说明: 直接输入程序目录即可 http://loca ...
- 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 ...
- Laravel - 解决连接MySQL时报"The server requested authentication method unknown to the client”错误
2019-04-12发布:hangge阅读:934 1,问题描述 最近建了个 Laravel 项目,当配置好 MySQL 数据库进行请求时,页面报如下错误: SQLSTATE[HY000] [ ...
- 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 ...
- [转]OData and Authentication – Part 6 – Custom Basic Authentication
本文转自:https://blogs.msdn.microsoft.com/astoriateam/2010/07/21/odata-and-authentication-part-6-custom- ...
- Atitit HTTP 认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结
Atitit HTTP认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结 1.1. 最广泛使用的是基本验证 ( ...
随机推荐
- java学习——正则表达式
本文内容来源于 历经5年锤练--史上最适合初学者入门的Java基础视频 例:要求QQ号长度为5~15位,不能以0开头 String qq="123456"; String reg ...
- Android Fragment用法之给Activity创建事件回调
在某些案例中,可能需要Fragment与Activity共享事件.在Fragment内部定义一个回调接口是一个好方法,并且规定由持有它的Activity实现这个回调方法.当Activity通过接口接受 ...
- Java导入证书失败Keystore was tampered with, or password was incorrect
keytool 错误: java.io.IOException: Keystore was tampered with, or password was incorrect 在进行证书相关操作, ...
- JS之对象数组遍历?
一.js实现遍历对象 <script> ","destroy":"97%"}; var props = ""; for ...
- JS中typeof与instanceof的区别 (2010-05-26 10:47:40
JavaScript 中 typeof 和 instanceof 常用来判断一个变量是否为空,或者是什么类型的.但它们之间还是有区别的: typeof typeof 是一个一元运算,放在一个运算数之前 ...
- 简单代码JS随机,数组操作,延时执行
<script language="javascript"> var str="baidu.com,163.com,sohu.com,kankan.com,1 ...
- HTML资源(推荐)
W3C在线验证工具:http://validator.w3.org/ (X)HTML嵌套规则:http://www.cnblogs.com/PeunZhang/archive/2012/03/11/2 ...
- Facebook和Google如何激发工程师的创造力
http://taiwen.lofter.com/post/664ff_ad8a15 今天终于“朝圣”了两个伟大的公司——Facebook和Google,对创造力和驱动力的来源有了更多的理解,尤其是对 ...
- JS版本网站资源状态检测
Title:JS版本网站资源状态检测 --2012-08-28 14:08 前几天需要一个网站状态检测的东东,后面写了个蹩脚的JS版本,里面用到了以前没用过的东西,在这里记下来,其实批处理加curl ...
- Android比较字符串是否为空(isEmpty)
StringUtils.java: package com.yx.equipment_collection.utils; import android.annotation.SuppressLint; ...