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. osg for android (一) 简单几何物体的加载与显示

    1. 首先需要一个OSG for android的环境. (1).NDK 现在Eclipse 对NDK已经相当友好了,已经不需要另外cygwin的参与,具体可以参考 Android NDK开发篇(一) ...

  2. 网易JS面试题与Javascript词法作用域说明

    调用对象位于作用域链的前端,局部变量(在函数内部用var声明的变量).函数参数及Arguments对象都在函数内的作用域中--这意味着它们隐藏了作用域链更上层的任何同名的属性. 2010年9月14日, ...

  3. git clone 远程分支

    先初始化一个git 仓库  命令:git init git clone 相应的地址 这样就会形成一个.git 隐藏文件夹 一定要注意的,要进入到子文件夹去git checkout feature/0. ...

  4. 在at91sam9260处理器上调试linux2.6.33.7的过程

    本文脉络: 1.SAM9260处理器介绍,单板机配置. 2.SAM-BA的运行机制与applets的修改. 3.修改bootstrap. 4.内核源码获取与打补丁. 5.基于ubuntu的开发环境搭建 ...

  5. ssh 文件传输

    在linux下一般用scp这个命令来通过ssh传输文件. 1.从服务器上下载文件scp username@servername:/path/filename /var/www/local_dir(本地 ...

  6. obj文件的连接问题以及tlib的基本用法

    1.基础研究 用tcc将程序编译为.obj文件. 这里也可以使用tcc -linclude run.c来将run.c文件编译成run.obj文件. 再用tcc对下面的程序进行编译链接,发现提示错误: ...

  7. PHP之mysql笔记

    1:在php中提供了两个用于连接MySQL数据库服务器的函数. (1)int mysql_connect(hostname[:port][:/path/to/socket],user,pass). ( ...

  8. CentOS 6.5 + Nginx 1.8.0 + PHP 5.6(with PHP-FPM) 负载均衡源码安装 之 (二)PHP(PHP-FPM)安装篇

    编译安装PHP及内置PHP-FPM nginx本身不能处理PHP,它只是个web服务器,当接收到请求后,如果是php请求,则发给php解释器处理,并把结果返回给客户端(浏览器). nginx一般是把请 ...

  9. XJOI网上同步测试DAY14 T2

    思路:先考虑在D高度的最小圆覆盖,再一层一层往下走时,可以保证圆心与最开始的圆相同的时候答案是最优的. 时间复杂度O(n) 有一个坑点,就是我用了srand(time(NULL))就T了,RP太差了. ...

  10. delphi7开发webservice部属在apache服务器中 转

    delphi7开发webservice部属在apache服务器中 delphi7 webservice apache 用Delphi7开发Web Service程序,并把服务程序放在apache We ...