ssh登陆提示"Host key verification failed."的解决方法
2013-10-16 11:53
936 查看
1、在某些情况下,如同个IP地址,不同端口连到不同linux机子上时,可能有此提示
2、报错信息如下:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
23:00:20:83:de:02:95:f1:e3:34:be:57:3f:cf:2c:e7.
Please contact your system administrator.
Add correct host key in /home/xahria/.ssh/known_hosts to get rid of this message.
Offending key in /home/xahria/.ssh/known_hosts:8
RSA host key for localhost has changed and you have requested strict checking.
Host key verification failed.
3、用OpenSSH的人都知ssh会把你每个你访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告,避免你受到DNS Hijack之类的攻击。
4、在.ssh/config(或者/etc/ssh/ssh_config)中的配置项StrictHostKeyChecking:
默认是ask:如果连接和key不匹配,给出提示,并拒绝登录,默认是被注释掉的。
yes:如果连接与key不匹配,就拒绝连接,不会提示。
no:如果连接的key在本地不存在,那么就自动添加到文件中(默认是known_hosts),并且给出一个警告,可以连接成功。
5、为了防止出现警告提示,且解决同个IP不同端口连接,可选择性地降低安全性,如下配置:
vi /etc/ssh/ssh_config
StrictHostKeyChecking no
UserKnownHostsFile /dev/null #将knownhostfile设为/dev/null,就不保存在known_hosts中了
2、报错信息如下:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
23:00:20:83:de:02:95:f1:e3:34:be:57:3f:cf:2c:e7.
Please contact your system administrator.
Add correct host key in /home/xahria/.ssh/known_hosts to get rid of this message.
Offending key in /home/xahria/.ssh/known_hosts:8
RSA host key for localhost has changed and you have requested strict checking.
Host key verification failed.
3、用OpenSSH的人都知ssh会把你每个你访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告,避免你受到DNS Hijack之类的攻击。
4、在.ssh/config(或者/etc/ssh/ssh_config)中的配置项StrictHostKeyChecking:
默认是ask:如果连接和key不匹配,给出提示,并拒绝登录,默认是被注释掉的。
yes:如果连接与key不匹配,就拒绝连接,不会提示。
no:如果连接的key在本地不存在,那么就自动添加到文件中(默认是known_hosts),并且给出一个警告,可以连接成功。
5、为了防止出现警告提示,且解决同个IP不同端口连接,可选择性地降低安全性,如下配置:
vi /etc/ssh/ssh_config
StrictHostKeyChecking no
UserKnownHostsFile /dev/null #将knownhostfile设为/dev/null,就不保存在known_hosts中了
相关文章推荐
- ssh登陆提示"Host key verification failed."的解决方法
- SSH连接时出现Host key verification failed的原因及解决方法
- scp或ssh登录时遇到Host key verification failed问题的解决方法
- SSH连接时出现Host key verification failed的原因及解决方法
- SSH连接时出现Host key verification failed的原因及解决方法
- ssh登陆忽略known_hosts文件(ssh 登陆提示Host key verification failed.)
- scp或ssh登录时遇到Host key verification failed问题的解决方法
- 配置SSH时遇到 "Host key verification failed." 的解决方案
- SSH连接时出现Host key verification failed的原因及解决方法
- SSH连接时出现Host key verification failed的原因及解决方法
- SSH连接时出现Host key verification failed的原因及解决方法
- SSH 登录失败:Host key verification failed 的解决方法
- SSH连接时出现Host key verification failed的原因及解决方法
- nova resize "Host key verification failed"
- 解决ssh登录Host key verification failed
- macOS卸载MySQL数据库与workbench提示"Your connection attempt failed for user 'root' from your host ..."解决方法
- An error "Host key verification failed" when you connect to other computer by OSX SSH
- Linux——SSH 登录失败:Host key verification failed 的处理方法
- mac配置完ssh依然提示"Enter passphrase for key"解决方法
- SSH 登录失败:Host key verification failed 的处理方法