linux-ssh-known_hosts-ssh报错

记录错误,
今天做了一晚上docker
因为使用的都是桥接,所以IP都一样,有时候在创建容器名也可能跟之前的冲突,会报错 
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Someone could be eavesdropping on you right now (man-in-the-middle attack)!

It is also possible that a host key has just been changed.

The fingerprint for the ECDSA key sent by the remote host is

5b:82:47:82:ef:cf:76:96:63:a6:7c:ce:86:7f:eb:9b.

Please contact your system administrator.

Add correct host key in /root/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /root/.ssh/known_hosts:2

ECDSA host key for [192.168.0.141]:2222 has changed and you have requested strict checking.

Host key verification failed.

大概意思是秘钥什么验证错误,导致无法ssh链接登录,
问题出在每次链接成功一个ssh时,会自动缓存当前这个的公钥.下次链接时候会自动验证,如果正确则成功,错误则弹出提示
但是在docker环境中如果经常重新生成docker容器,这时候用ssh管理就会很费劲,经常遇到这种问题
一个手动方法是
vim ~/.ssh/known_hosts   进去删掉关于链接IP的所有记录

第二个则是修改配置文件
vim ~/.ssh/config 

写入两行信息,重启系统,就不会自动记录秘钥,
主要是方便以后docker的自动化管理,但是安全度相对减少

时间: 2024-10-16 21:04:42

linux-ssh-known_hosts-ssh报错的相关文章

Linux下Oracle11G RAC报错:在安装oracle软件时报file not found一例

Linux下Oracle11G RAC报错:在安装oracle软件时报file notfound一例 1.现象 之前安装一切都比較顺利,安装oracle软件时,进度到30%时报错:file not found(/u01/app/oracle/product/11.2.0/db_1/owb/external/oc4j_applications/applications/WFMLRSVCApp.ear) 2.应对策略 1.  改变选择语言处.仅仅选择"English": 2.  又一次解压

linux下启动tomcat报错 Failed to get local InetAddress for VMID. This is unlikely to matter. At all. We'll add some extra randomness

INFO [localhost-startStop-1] com.mchange.v2.log.slf4j.Slf4jMLog$Slf4jMLogger$InfoLogger.log(206) | Failed to get local InetAddress for VMID. This is unlikely to matter. At all. We'll add some extra randomnessjava.net.UnknownHostException: Oracle.Linu

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 15:34wdjhz | 分类:服务器软件 | 浏览5318次 configure: error: Cannot find MySQL header files under /usr/include/mysql.Note that the MySQL client library is not bun

intellj下打的jar包在linux服务器删执行报错

intellj下打的jar包在linux服务器删执行报错:http://blog.csdn.net/qq_25925973/article/details/53370501window下用解压工具打开jar包,删除META-INFO下的.SF .RSA文件,删除后上次到linux服务器上,用java jar xx.jar去执行 原文地址:http://blog.51cto.com/5731674/2087591

Linux安装ElasticSearch启动报错的解决方法

Linux安装ElasticSearch后,ElasticSearch是不能用root用户启动的,以root用户启动会报错Refer to the log for complete error details,出现这种情况该如何解决呢?下面小编就为大家带来Linux安装ElasticSearch启动报错的解决方法,一起去看看吧 今天就出现的异常问题专门解决一下.你安装好ElasticSearch以后,在启动的时候需要注意的问题是,ElasticSearch是不能用root用户启动的(这是根据el

Linux挂载U盘报错:mount: unknown filesystem type 'ntfs'

原因:由于Linux上无法识别NTFS格式的分区的原因 解决方法:安装 ntfs-3g 1.下载:wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz 2.解压:tar zxvf ntfs-3g_ntfsprogs-2017.3.23.tgz 3.进安装目录,编辑 #./configure # make # make install 执行./configure时报错:/bin/rm: cannot remove `l

linux 安装python3.7 报错No module named '_ctypes'

ModuleNotFoundError: No module named '_ctypes' 操作系统:centos yum install libffi-devel ./configure --enable-optimizations make altinstall 参考:https://bugs.python.org/issue31652 linux 安装python3.7 报错No module named '_ctypes' 原文地址:https://www.cnblogs.com/bo

git ssh 链接服务器报错

原文地址:http://blog.csdn.net/ausboyue/article/details/52775281 Linux SSH命令错误:ECDSA host key "ip地址" for  has changed and you have requested strict checking.记录下方便记忆. 解决方案:在终端上输入以下命令: ssh-keygen -R "你的远程服务器ip地址" 目的是清除你当前机器里关于你的远程服务器的缓存和公钥信息,

ssh登录失败,报错:Pseudo-terminal will not be allocated because stdin

现象: 需要登录线上的一台目标机器A,但是不能直接登录(没有登录权限),需要先登录B机器,然后从B机器跳转到A机器. 脚本如下: localhost:~ root# cat IDC-7.sh #!/bin/bash ssh [email protected] "ssh -p25791 [email protected]" 但是在执行脚本的时候报错如下: Pseudo-terminal will not be allocated because stdin 原因: 伪终端将无法分配,因为

fedora终端ssh其它主机报错 Permission denied, please try again.

今天升级fedora23,普通用户ssh到我的openwet路由器报错 [[email protected] ~]$ ssh 192.168.10.1  [email protected]'s password: Permission denied, please try again. 解决方法: 去掉第25行#注释即可 [[email protected] sunliming]# vim /etc/ssh/ssh_config 25  PasswordAuthentication yes --