首页 > 其他分享 >7 常见问题

7 常见问题

时间:2024-07-09 12:30:30浏览次数:12  
标签:常见问题 sshpass checking host hosts ssh key

关于ssh连接一些常见的错误说明

  1. ERROR! to use the 'ssh' connection type with passwords, you must install the sshpass program

完整错误示例如下:

root@ctnr:/etc/ansible# ansible '*.a32-168-1.*' -m ping
ctnr.a32-168-1.prod.yiz | FAILED! => {
    "failed": true, 
    "msg": "ERROR! to use the 'ssh' connection type with passwords, you must install the sshpass program"
}
 

一般出现这种错误,是在通过密码验证远程被管理机的时候,需要在server端安装sshpass:

yum install sshpass -y 
 
  1. Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host's fingerprint to your known_hosts file to manage this host

完整错误如下:

ansible test -a 'uptime'

192.168.1.1| FAILED =>Using a SSH password instead of a key is not possible because HostKey checking is enabled and sshpass does not support this.Please add this host's fingerprint to your known_hosts file to manage this host.
192.168.1.2 | FAILED => Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.  Please add this host's fingerprint to your known_hosts file to manage this host.
 

这种错误通常就出现在server端第一次连接被管理机的时候,就是上面说到的需要通过输入yes/no进行确认将key字符串加入到~/.ssh/known_hosts文件中。

解决办法有两个:

  • 通过修改上面提到的host_key_checking,将其设置为false
  • 通过修改ssh_args参数,修改如下:
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no 
 

标签:常见问题,sshpass,checking,host,hosts,ssh,key
From: https://www.cnblogs.com/david-cloud/p/18291547

相关文章

  • linux 上安装FTP : vsftpd (含常见问题:读取目录列表失败,的处理)
    服务器上有时候需要安装ftp以便调试或给不懂使用服务器命令的同学更新文件 1、安装vsftpdyumupdateyuminstallvsftpd2、编辑配置文件确保以下配置的值和下面一致anonymous_enable=NOlocal_enable=YESwrite_enable=YESchroot_local_user=YES这些配置......
  • 性能测试常见问题
    性能测试的概念及分类:性能测试:首先要确定系统的业务模型,指定合理的测试方案和策略,通过自动化的工具模拟正常,异常,峰值等负载条件对系统的各项指标进行验证。基准测试:系统无压力的情况下,选择一个接口模拟一些用户并发,持续执行一段时间获取该交易的响应时间,TPS,资源消耗等,主要的目......
  • 用友U8+存货核算——5.报表及常见问题
    ......
  • PTrade量化软件常见问题整理系列1
    一、get_fundamentals获取无数据返回。    get_fundamentals(g.stock_list,'profit_ability','roic',context.previous_date)返回nan。解决方案:1、返回同样的列表,获取valuation表,数据返回正常;2、建议在研究内执行get_fundamentals('00065*.SZ','profit_ability',......
  • PTrade量化软件常见问题整理系列2
    一、研究界面使用get_fundamentals函数报错:error_info:获取token失败?    研究界面使用get_fundamentals函数报错:error_info:获取token失败?1、测试版本202202.01.052,升级202202.01.051版本后,为了解决不同机器请求openapi时使用不同token导致token失效而频繁切换token,做......
  • Kithara常见问题解答
    目录通用问题我的内核驱动程序已经签名了吗?是否可以在打开驱动程序时防止显示介绍窗口?Windows7仍然支持吗?错误0x10142422(`KSERROR_CANNOT_START_KERNEL`)在`KS_openDriver`时出现?错误10145241(KSERROR_CANNOT_START_KERNEL)在KS_openDriver时出现?可以在C#应用程......
  • 使用.Net6中的System.Text.Json遇到几个常见问题及解决方案
    原文链接:https://blog.csdn.net/zls365365/article/details/124162096前言以前.NetCore是不内置JSON库的,所以大家都用Newtonsoft的JSON库,而且也确实挺好用的,不过既然官方出了标准库,那更方便更值得我们多用用,至少不用每次都nuget安装Newtonsoft.Json库了。字符编码问题默认的S......
  • Git 常见问题处理
    Pushfailed:Unabletoaccess'https://github.com/financialfly/lzz.git/':OpenSSLSSL_connect:SSL_ERROR_SYSCALLinconnectiontogithub.com:443因为Git的Http代理的问题,Git支持三种协议:git://、ssh://和http://,本来push的时候应该走ssh隧道的,但是因为设......
  • 详解mysql安装、常见问题及解决方法
    一、MySQL简介MySQL是一个广泛使用的开源关系型数据库管理系统(RDBMS),由瑞典公司MySQLAB开发,后被SunMicrosystems收购,最终归属Oracle公司所有。它以其快速、可靠、可扩展的特性而闻名,并且因其开源的性质在各类应用中得到了广泛应用。以下是MySQL的详细简介:主......
  • JVM常见问题
    文章目录1JVM组成1.1JVM由那些部分组成,运行流程是什么?1.2什么是程序计数器?1.3你能给我详细的介绍Java堆吗?元空间(MetaSpace)介绍1.4什么是虚拟机栈1.5堆和栈的区别1.6能不能解释一下方法区?1.5.1概述1.5.2常量池1.5.3运行时常量池1.7你听过直接内存吗?1.8......