当前位置: 首页 > news >正文

ssh指定的密钥协商方式以及Ansible的hosts文件修改密钥协商方式

一、首先你要知道用什么加密协商。

[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
10.10.2.190 | UNREACHABLE! => {"changed": false,"msg": "Failed to connect to the host via ssh: Unable to negotiate with 10.10.2.190 port 22: no matching key exchange method found. Their offer: curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256","unreachable": true
}

这里会告诉你:
Their offer: curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256"

然后你可以通过ssh先进行测试:
 

ssh -l root -o KexAlgorithms=diffie-hellman-group-exchange-sha256 10.10.2.190

-o 后根指定的协商方式

二、修改Ansible特定的hosts协商方式

[klin]
10.10.2.190 ansible_ssh_user='root' ansible_ssh_pass='Admin123@pl' ansible_ssh_args='-o KexAlgorithms=diffie-hellman-group-exchange-sha256'

在hosts文件中加上 ansible_ssh_args='-o KexAlgorithms=diffie-hellman-group-exchange-sha256'

此时Ansible的ssh命令等价于上面的ssh命令。 

http://www.lryc.cn/news/187421.html

相关文章:

  • NLP 项目:维基百科文章爬虫和分类【01】 - 语料库阅读器
  • QT sqlite的简单用法
  • 大模型部署手记(12)LLaMa2+Chinese-LLaMA-Plus-2-7B+Windows+text-gen+中文对话
  • C#导出本机Win32native dll
  • express-generator快速构建node后端项目
  • 视频监控系统/视频汇聚平台EasyCVR如何反向代理进行后端保活?
  • 金融信创黄金三年:小程序生态+跨端技术框架构建
  • 这短短 6 行代码你能数出几个bug?
  • 【毕设选题】深度学习 机器视觉 车位识别车道线检测 - python opencv
  • 不同数据类型在单片机内存中占多少字节?
  • 安卓LinearLayout让控件居中的办法
  • uniapp下拉刷新
  • 【工作记录】css3 grid布局笔记
  • 区块链技术-比特币数据结构
  • SpringBoot结合dev-tool 实现IDEA项目热部署
  • flink中使用外部定时器实现定时刷新
  • Spring Cloud Pipelines 入门实践
  • G1 GC详解及设置
  • GitHub详细教程
  • 【小沐学Python】Python实现Web图表功能(Dash)
  • 【RabbitMQ】docker rabbitmq集群 docker搭建rabbitmq集群
  • Linux 网络驱动实验
  • 访问Apache Tomcat的虚拟主机管理页面
  • 【算法】排序——归并排序和计数排序
  • discuz封面设置失败的解决办法(centos系统+windows系统)
  • AI绘画-Stable Diffusion笔记
  • 中值滤波算法及例程
  • SpringBoot 如何使用 Ehcache 作为缓存
  • Stable Diffusion 图片换脸插件Roop保姆教程 附错误解决办法和API使用
  • 华为OD机试 - 组成最大数(Java 2023 B卷 100分)