ssh The authenticity of host '10.11.26.2 (10.11.26.2)' can't be established
The authenticity of host '10.11.26.2 (10.11.26.2)' can't be established.
ECDSA key fingerprint is SHA256:8Dc40hVvLGlPkLiv5IWEQZyjeFb2fPwQCcqhBCkMuPk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.11.26.2' (ECDSA) to the list of known hosts.
ssh连接新机子的时候会报这个提示,原理:
SSH 公钥检查是一个重要的安全机制,可以防范中间人劫持等黑客攻击。但是在特定情况下,严格的 SSH 公钥检查会破坏一些依赖 SSH 协议的自动化任务,就需要一种手段能够绕过 SSH 的公钥检查。
SSH 连接远程主机时,会检查主机的公钥。如果是第一次该主机,会显示该主机的公钥摘要,提示用户是否信任该主机。
当选择接受,就会将该主机的公钥追加到文件 ~/.ssh/known_hosts 中。当再次连接该主机时,就不会再提示该问题了。
该IP地址的公钥改变了,当使用 SSH 连接的时候,会报错,删除known_hosts文件
如何让连接新主机时,不进行公钥确认?
在首次连接服务器时,会弹出公钥确认的提示。这会导致某些自动化任务中断。SSH 客户端的 StrictHostKeyChecking 配置指令,可以实现当第一次连接服务器时,自动接受新的公钥。只需要修改 /etc/ssh/ssh_config 文件,包含下列语句:
Host *
StrictHostKeyChecking no
或者在 ssh 命令行中用 -o 参数
$ ssh -o StrictHostKeyChecking=no 192.168.0.110
如何防止远程主机公钥改变导致 SSH 连接失败
当确认中间人劫持攻击风险比较小的情况下,才可以使用下面的方法,禁用 SSH 远程主机的公钥检查。 SSH 客户端提供一个 UserKnownHostsFile 配置,允许指定不同的 known_hosts 文件。那么将 known_hosts 指向不同的文件,不就不会造成公钥冲突导致的中断了么?
$ ssh -o UserKnownHostsFile=/dev/null 192.168.0.110
The authenticity of host '192.168.0.110 (192.168.0.110)' can't be established.
RSA key fingerprint is e9:0c:36:89:7f:3c:07:71:09:5a:9f:28:8c:44:e9:05.
Are you sure you want to continue connecting (yes/no)?
ssh The authenticity of host '10.11.26.2 (10.11.26.2)' can't be established的更多相关文章
- The authenticity of host '172.16.33.53 (172.16.33.53)' can't be established的问题(日志六)
用ssh登录一个机器(换过ip地址)会出现如下错误 weiguohui@weiguohui1-virtual-machine:~/.ssh$ ssh 172.16.33.53The authentic ...
- ssh The authenticity of host 192.168.0.xxx can't be established
用ssh登录一个机器(换过ip地址),提示输入yes后,屏幕不断出现y,只有按ctrl + c结束 错误是:The authenticity of host 192.168.0.xxx can't b ...
- 【Git】The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
背景,在服务器用www用户身份 执行拉取命令报错 sudo -u www git pull 原因分析: 在新生成密钥之后,在.ssh文件夹中少了known_hosts文件 解决办法: Are you ...
- ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题
scp免密码登录:Linux基础 - scp免密码登陆进行远程文件同步 执行scp一直是OK的,某天在本地生成了公钥私钥后,scp到某个IP报以下错误 The authenticity of host ...
- 好记心不如烂笔头,ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题
用ssh登录一个机器(换过ip地址),提示输入yes后,屏幕不断出现y,只有按ctrl + c结束 错误是:The authenticity of host 192.168.0.xxx can't b ...
- 好记心不如烂笔头,ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题
用ssh登录一个机器(换过ip地址),提示输入yes后,屏幕不断出现y,仅仅有按ctrl + c结束 错误是:The authenticity of host 192.168.0.xxx can't ...
- Hadoop和HBase中出现 ssh登录 The authenticity of host 192.168.0.xxx can't be established.
用ssh登录一个机器(换过ip地址),提示输入yes后,屏幕不断出现y,只有按ctrl + c结束 错误是:The authenticity of host 192.168.0.xxx can't b ...
- ssh 绕过The authenticity of host '*.*.*.*' can't be established 直接输入密码
只需要使用命令 ssh webgate@10.129.6.237 -o "StrictHostKeyChecking no" 即可以绕过 insp_ap@inspect02:/ho ...
- 关于 git 本地创建 SSH Key 遇到的一点问题(①file to save the key & ②the authenticity of host...)
背景 由于想测试一下 SSH Key 创建的路径(.ssh 目录路径)对于不同位置 git 项目是否有效. 比如,.ssh 默认在 C:\[users]\[username] 目录下,而项目 proj ...
随机推荐
- Applying the Kappa architecture in the telco industry
https://www.oreilly.com/ideas/applying-the-kappa-architecture-in-the-telco-industry Kappa architectu ...
- MySQL数据库----多表查询
一.介绍 首先先准备表 员工表和部门表 #建表 create table department( id int, name varchar(20) ); create table employee1( ...
- ab命令压力测试
网站性能压力测试是服务器网站性能调优过程中必不可缺少的一环.只有让服务器处在高压情况下,才能真正体现出软件.硬件等各种设置不当所暴露出的问题. 性能测试工具目前最常见的有以下几种:ab.http_lo ...
- Fine报表权限流程分析记录
Fine报表权限流程分析记录 URL访问三种类型的报表:第一个:BI报表 例如: http://192.25.103.250:37799/WebReport/ReportServer?op=fr_bi ...
- troubleshooting-执行导数shell脚本抛异常error=2, No such file or directory
Cannot run program "order_log.sh" (in directory "/data/yarn/nm/usercache/chenweidong/ ...
- oracle一些工作笔记
表空间: oracle表空间对应的数据文件: SELECT t1.name, t2.name FROM v$tablespace t1, v$datafile t2 WHERE t1.ts#=t2.t ...
- cogs 2223. [SDOI2016 Round1] 生成魔咒
★★☆ 输入文件:menci_incantation.in 输出文件:menci_incantation.out 简单对比 时间限制:1 s 内存限制:128 MB [题目描述]魔咒串由许多魔咒字符组 ...
- luogu P3387 【模板】缩点
题目 好久没法博客了 这次就水个板子题目吧 tarjan缩点之后重新建图 而且边权应该都是正的(要不我怎么能这么轻松水过去) 在新图上记忆化一下就好了 f[i] 表示 开头选i这个点 的 路径最大值 ...
- 星系炸弹|2015年蓝桥杯B组题解析第二题-fishers
星系炸弹 在X星系的广袤空间中漂浮着许多X星人造"炸弹",用来作为宇宙中的路标. 每个炸弹都可以设定多少天之后爆炸. 比如:阿尔法炸弹2015年1月1日放置,定时为15天,则它在2 ...
- html5标签 H5标签
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"& ...