ssh: connect to host 192.168.1.20 port 22: No route to host解决方案
程序员文章站
2024-03-14 09:13:34
...
ping 192.168.1.20 | ping 192.168.1.21 | ping 192.168.1.22 不通 解释:在一台服务器上ip为(192.168.1.31);部署三台虚拟机(192.168.1.20; 192.168.1.21;192.168.1.22)
解决步骤:
第一步 ssh [email protected]
[email protected]:~$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
SHA256:7mW45tY1AWlWW5ci+xHYYbV55x1dKZy3a8F1CSou140.
Please contact your system administrator.
Add correct host key in /home/hairui/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/hairui/.ssh/known_hosts:11
remove with:
ssh-****** -f "/home/hairui/.ssh/known_hosts" -R 192.168.1.31
ECDSA host key for 192.168.1.31 has changed and you have requested strict checking.
Host key verification failed.
第二部 vim编辑 根据上面的内容(Offending ECDSA key in /home/hairui/.ssh/known_hosts:11
remove with:
ssh-****** -f “/home/hairui/.ssh/known_hosts” -R 192.168.1.31
vim /home/hairui/.ssh/known_hosts
用dd(删除光标所在的行) 删除known_hosts里边的
localhost ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPUD5leFIEopvZ6FeQ+H7YwgtC43m4yLkyFNGdNBkYxuA/9UdWiinaNieBGJfq0Vuw7RFeBloI9M404SVAtjTTw=
hadoop ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPUD5leFIEopvZ6FeQ+H7YwgtC43m4yLkyFNGdNBkYxuA/9UdWiinaNieBGJfq0Vuw7RFeBloI9M404SVAtjTTw=
192.168.1.204 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.205 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.206 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.101 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.112 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.160 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.108 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.201 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.31 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKAvpD338+XGbpAqJFi/rlz1Qml86tnm07pEaILxrDXffjW2KEQKrSiHPAUaop81Fm+f2R1FMUSE7OceeTIYcAs=
192.168.1.32 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE0WZiBL6Sw8fY1XsZ5khfa/Xn71J74pZXVx45vZbOHmn2QX4wTl9xCHk5Yab7SjcNhtsyCj5mAJn35QEPSKVik=
192.168.1.33 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFNiLsIhbyhgT6/P87QZs5HzrZwxha0SGEDAUub9BGgNQf14r3lt2x5ZN45uvA4ipt6NP0ObfbHSAtam7+xrGco=
hairui01 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
hairui02 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
hairui03,192.168.1.207 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.202 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.203 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.151 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
149.28.193.84 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOw6y+Z+45kWTS3jTc7MjAO0J4qZnpjx8dVGwUWCtYeUgtOBsD585YqgIqOj4uUbZt+vgHOYqFNVFoLfobT18DU=
45.77.130.32 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE6sUGYVVZqYApfBZgHn+udmF9Wwd1+KbrvWisfdMMKzqVwNcWeJF02CQnU7ll7/+vCCHmoQhSVwSEuam2lDTd0=
192.168.1.152 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s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2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCtgiC03oABhArtrMtU1UvM7BGHyd9f+yuih77v1qcxtVYHvjiaJOprRGDAK0CW4Wy8AeJI3obkC2mE6Dja8nRw=
bigdata01 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCtgiC03oABhArtrMtU1UvM7BGHyd9f+yuih77v1qcxtVYHvjiaJOprRGDAK0CW4Wy8AeJI3obkC2mE6Dja8nRw=
bigdata02 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCtgiC03oABhArtrMtU1UvM7BGHyd9f+yuih77v1qcxtVYHvjiaJOprRGDAK0CW4Wy8AeJI3obkC2mE6Dja8nRw=
bigdata03 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCtgiC03oABhArtrMtU1UvM7BGHyd9f+yuih77v1qcxtVYHvjiaJOprRGDAK0CW4Wy8AeJI3obkC2mE6Dja8nRw=
[email protected]:~$ vim /home/hairui/.ssh/known_hosts
第三部,把下面这一行删除掉
192.168.1.31 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKAvpD338+XGbpAqJFi/rlz1Qml86tnm07pEaILxrDXffjW2KEQKrSiHPAUaop81Fm+f2R1FMUSE7OceeTIYcAs=
virsh list -all
第四部,查看 ping 192.168.1.31 看看是否能ping 通
PING 192.168.1.31 (192.168.1.31) 56(84) bytes of data.
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=0.458 ms
64 bytes from 192.168.1.31: icmp_seq=2 ttl=64 time=0.303 ms
64 bytes from 192.168.1.31: icmp_seq=3 ttl=64 time=0.208 ms
64 bytes from 192.168.1.31: icmp_seq=4 ttl=64 time=0.220 ms
第五步,下面操作 登录到192.168.1.31 ;ip上
[email protected]:/home/hairui# ssh [email protected]
The authenticity of host '192.168.1.31 (192.168.1.31)' can't be established.
ECDSA key fingerprint is SHA256:dBhXAvYlTpbZvIPf7ZC2b4LlHyUd/NULeoRP0eeaKsw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.31' (ECDSA) to the list of known hosts.
[email protected]'s password:
Last login: Mon Dec 10 14:26:31 2018 from 192.168.1.98
第六步,查看server1 server2 server3 的状态 shut off关闭状态
[[email protected] ~]# virsh list --all
Id Name State
----------------------------------------------------
- server1 shut off
- server2 shut off
- server3 shut off
第七部,开启运行 server1 server2 server3
[[email protected] ~]# virsh start server1
Domain server1 started
[[email protected] ~]# virsh start server2
Domain server2 started
[[email protected] ~]# virsh start server3
Domain server3 started
第八步,查看 server1 server2 server3的状态 | 已经运行 状态 running
[[email protected] ~]# virsh list --all
Id Name State
----------------------------------------------------
1 server1 running
2 server2 running
3 server3 running
第九步,最后 ssh [email protected] 登录上去了
解决问题
game is over
[email protected]:~$ ssh [email protected]
The authenticity of host '192.168.1.20 (192.168.1.20)' can't be established.
ECDSA key fingerprint is SHA256:KHP9RXd/f2XkwmgV3wrQVNRMNzxsiltT6RFma2NTC1U.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.20' (ECDSA) to the list of known hosts.
Last login: Mon Dec 10 14:32:50 2018 from 192.168.1.88
[[email protected] ~]# ^C
[email protected]:/home/hairui# ssh [email protected]
ssh: connect to host 192.168.1.20 port 22: No route to host
[email protected]:/home/hairui# ssh [email protected]
ssh: connect to host 192.168.1.20 port 22: No route to host
[email protected]:/home/hairui# virsh list
Id 名称 状态
----------------------------------------------------
2 centos7.0-2 running
[email protected]:/home/hairui# virsh list
Id 名称 状态
----------------------------------------------------
2 centos7.0-2 running
[email protected]:/home/hairui# virsh list --all
Id 名称 状态
----------------------------------------------------
2 centos7.0-2 running
- centos7.0 关闭
[email protected]:/home/hairui# virsh start 192.168.1.20
错误: 获得域 '192.168.1.20' 失败
错误: 未找到域: 没有与名称 '192.168.1.20' 匹配的域
[email protected]:/home/hairui# virsh start [email protected] --console
错误: 获得域 '[email protected]' 失败
错误: 未找到域: 没有与名称 '[email protected]' 匹配的域
[email protected]:/home/hairui# virsh start bigdata01
错误: 获得域 'bigdata01' 失败
错误: 未找到域: 没有与名称 'bigdata01' 匹配的域
[email protected]:/home/hairui# virsh list --all
Id 名称 状态
----------------------------------------------------
2 centos7.0-2 running
- centos7.0 关闭
[email protected]:/home/hairui# virsh list all
错误: 非期望的数据 'all'
[email protected]:/home/hairui# virsh list --all
Id 名称 状态
----------------------------------------------------
2 centos7.0-2 running
- centos7.0 关闭
[email protected]:/home/hairui# exit
注销
[email protected]:~$ virsh list --all
Id 名称 状态
----------------------------------------------------
2 centos7.0-2 running
- centos7.0 关闭
[email protected]:~$ virsh start centos7.0
域 centos7.0 已开始
[email protected]:~$ virsh list --all
Id 名称 状态
----------------------------------------------------
2 centos7.0-2 running
3 centos7.0 running
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.20 port 22: No route to host
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.20 port 22: No route to host
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.20 port 22: No route to host
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.20 port 22: No route to host
[email protected]:~$ ssh [email protected]
Last failed login: Mon Dec 10 18:14:40 CST 2018 from 218.92.1.149 on ssh:notty
There were 11558 failed login attempts since the last successful login.
Last login: Wed Dec 5 18:29:18 2018 from 106.119.26.2
[[email protected] ~]# virsh list --all
-bash: virsh: command not found
[[email protected] ~]# exit
logout
Connection to 144.202.58.185 closed.
[email protected]:~$ virsh list --all
Id 名称 状态
----------------------------------------------------
2 centos7.0-2 running
- centos7.0 关闭
[email protected]:~$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
SHA256:7mW45tY1AWlWW5ci+xHYYbV55x1dKZy3a8F1CSou140.
Please contact your system administrator.
Add correct host key in /home/hairui/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/hairui/.ssh/known_hosts:11
remove with:
ssh-****** -f "/home/hairui/.ssh/known_hosts" -R 192.168.1.31
ECDSA host key for 192.168.1.31 has changed and you have requested strict checking.
Host key verification failed.
[email protected]:~$ rm -rf /home/hairui/.s
.sbt/ .sudo_as_admin_successful
.scala_history .sunpinyin/
.sogouinput/ .swt/
.ssh/
[email protected]:~$ cat /home/hairui/.ssh/known_hosts
localhost ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPUD5leFIEopvZ6FeQ+H7YwgtC43m4yLkyFNGdNBkYxuA/9UdWiinaNieBGJfq0Vuw7RFeBloI9M404SVAtjTTw=
hadoop ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPUD5leFIEopvZ6FeQ+H7YwgtC43m4yLkyFNGdNBkYxuA/9UdWiinaNieBGJfq0Vuw7RFeBloI9M404SVAtjTTw=
192.168.1.204 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.205 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.206 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.101 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.112 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.160 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.108 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.201 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.31 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKAvpD338+XGbpAqJFi/rlz1Qml86tnm07pEaILxrDXffjW2KEQKrSiHPAUaop81Fm+f2R1FMUSE7OceeTIYcAs=
192.168.1.32 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE0WZiBL6Sw8fY1XsZ5khfa/Xn71J74pZXVx45vZbOHmn2QX4wTl9xCHk5Yab7SjcNhtsyCj5mAJn35QEPSKVik=
192.168.1.33 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFNiLsIhbyhgT6/P87QZs5HzrZwxha0SGEDAUub9BGgNQf14r3lt2x5ZN45uvA4ipt6NP0ObfbHSAtam7+xrGco=
hairui01 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
hairui02 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
hairui03,192.168.1.207 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.202 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.203 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
192.168.1.151 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
149.28.193.84 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOw6y+Z+45kWTS3jTc7MjAO0J4qZnpjx8dVGwUWCtYeUgtOBsD585YqgIqOj4uUbZt+vgHOYqFNVFoLfobT18DU=
45.77.130.32 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE6sUGYVVZqYApfBZgHn+udmF9Wwd1+KbrvWisfdMMKzqVwNcWeJF02CQnU7ll7/+vCCHmoQhSVwSEuam2lDTd0=
192.168.1.152 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDfLKSgn3d4NP8yGz4gm9s4XVILEPi74U0186yrgAr1733UqVOem6rAfaRxb+wdksSrm7tvq0NokEiscc3aEFbc=
149.28.152.11 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAo7AhBicTvC7ff2/YG3a7qleo3/pawqnx/b9HwxcD8yo6CMF7eLPAnVsNCWRK5iO7SBi44mxldLRaZDaH+K6KY=
144.202.58.185 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTY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E6Dja8nRw=
bigdata02 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCtgiC03oABhArtrMtU1UvM7BGHyd9f+yuih77v1qcxtVYHvjiaJOprRGDAK0CW4Wy8AeJI3obkC2mE6Dja8nRw=
bigdata03 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCtgiC03oABhArtrMtU1UvM7BGHyd9f+yuih77v1qcxtVYHvjiaJOprRGDAK0CW4Wy8AeJI3obkC2mE6Dja8nRw=
[email protected]:~$ vim /home/hairui/.ssh/known_hosts
[email protected]:~$ ssh [email protected]
The authenticity of host '192.168.1.31 (192.168.1.31)' can't be established.
ECDSA key fingerprint is SHA256:7mW45tY1AWlWW5ci+xHYYbV55x1dKZy3a8F1CSou140.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.31' (ECDSA) to the list of known hosts.
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Permission denied (publickey,password).
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.31 port 22: No route to host
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.31 port 22: No route to host
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.31 port 22: No route to host
[email protected]:~$ ping 192.168.1.31
PING 192.168.1.31 (192.168.1.31) 56(84) bytes of data.
From 192.168.1.88 icmp_seq=1 Destination Host Unreachable
From 192.168.1.88 icmp_seq=2 Destination Host Unreachable
From 192.168.1.88 icmp_seq=3 Destination Host Unreachable
From 192.168.1.88 icmp_seq=4 Destination Host Unreachable
From 192.168.1.88 icmp_seq=5 Destination Host Unreachable
From 192.168.1.88 icmp_seq=6 Destination Host Unreachable
^C
--- 192.168.1.31 ping statistics ---
8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7144ms
pipe 4
hairui[email protected]:~$ virsh list --all
Id 名称 状态
----------------------------------------------------
- centos7.0 关闭
- centos7.0-2 关闭
[email protected]:~$ ping 192.168.1.31
PING 192.168.1.31 (192.168.1.31) 56(84) bytes of data.
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=0.458 ms
64 bytes from 192.168.1.31: icmp_seq=2 ttl=64 time=0.303 ms
64 bytes from 192.168.1.31: icmp_seq=3 ttl=64 time=0.208 ms
64 bytes from 192.168.1.31: icmp_seq=4 ttl=64 time=0.220 ms
^C
--- 192.168.1.31 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3031ms
rtt min/avg/max/mdev = 0.208/0.297/0.458/0.100 ms
[email protected]:~$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
SHA256:dBhXAvYlTpbZvIPf7ZC2b4LlHyUd/NULeoRP0eeaKsw.
Please contact your system administrator.
Add correct host key in /home/hairui/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/hairui/.ssh/known_hosts:10
remove with:
ssh-****** -f "/home/hairui/.ssh/known_hosts" -R 192.168.1.31
ECDSA host key for 192.168.1.31 has changed and you have requested strict checking.
Host key verification failed.
[email protected]:~$ ssh-****** -f /home/hairui/.s
.sbt/ .sogouinput/ .sudo_as_admin_successful .swt/
.scala_history .ssh/ .sunpinyin/
[email protected]:~$ ssh-****** -f /home/hairui/.ssh/known_hosts -R 192.168.1.31
# Host 192.168.1.31 found: line 10
/home/hairui/.ssh/known_hosts updated.
Original contents retained as /home/hairui/.ssh/known_hosts.old
[email protected]:~$ vim /home/hairui/.s
.sbt/ .sogouinput/ .sudo_as_admin_successful .swt/
.scala_history .ssh/ .sunpinyin/
[email protected]:~$ vim /home/hairui/.ssh/known_hosts
[email protected]:~$ vim /home/hairui/.ssh/known_hosts
[email protected]:~$ su
密码:
su:认证失败
[email protected]:~$ su
密码:
[email protected]:/home/hairui# find / -name vimrc
/media/hairui/1629eaf6-71f8-438f-aed5-62eb4a6b5cfd/etc/vim/vimrc
/media/hairui/1629eaf6-71f8-438f-aed5-62eb4a6b5cfd/usr/share/vim/vimrc
^C
[email protected]:/home/hairui# vim /media/hairui/1629eaf6-71f8-438f-aed5-62eb4a6b5cfd/etc/vim/vimrc
[email protected]:/home/hairui# vim /etc/profile
[email protected]:/home/hairui# vim /media/hairui/1629eaf6-71f8-438f-aed5-62eb4a6b5cfd/usr/share/vim/vimrc
[email protected]:/home/hairui# ping 192.168.1.31
PING 192.168.1.31 (192.168.1.31) 56(84) bytes of data.
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=0.465 ms
64 bytes from 192.168.1.31: icmp_seq=2 ttl=64 time=0.221 ms
64 bytes from 192.168.1.31: icmp_seq=3 ttl=64 time=0.224 ms
64 bytes from 192.168.1.31: icmp_seq=4 ttl=64 time=0.223 ms
^C
--- 192.168.1.31 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3064ms
rtt min/avg/max/mdev = 0.221/0.283/0.465/0.105 ms
[email protected]:/home/hairui# ssh [email protected]
The authenticity of host '192.168.1.31 (192.168.1.31)' can't be established.
ECDSA key fingerprint is SHA256:dBhXAvYlTpbZvIPf7ZC2b4LlHyUd/NULeoRP0eeaKsw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.31' (ECDSA) to the list of known hosts.
[email protected]'s password:
Last login: Mon Dec 10 14:26:31 2018 from 192.168.1.98
[[email protected] ~]# ls
anaconda-ks.cfg Desktop initial-setup-ks.cfg Public
CentOS-7-x86_64-Everything-1804.iso Documents Music Templates
CentOS-7-x86_64-Minimal-1804.iso Downloads Pictures Videos
[[email protected] ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
[[email protected] ~]# ls
anaconda-ks.cfg Desktop initial-setup-ks.cfg Public
CentOS-7-x86_64-Everything-1804.iso Documents Music Templates
CentOS-7-x86_64-Minimal-1804.iso Downloads Pictures Videos
[[email protected] ~]# virsh list -all
error: unexpected data '-all'
[[email protected] ~]# virsh list --all
Id Name State
----------------------------------------------------
- server1 shut off
- server2 shut off
- server3 shut off
[[email protected] ~]# virsh start server1 server2 server3
error: unexpected data 'server3'
[[email protected] ~]# virsh start *
error: unexpected data 'CentOS-7-x86_64-Minimal-1804.iso'
[[email protected] ~]# virsh list --all
Id Name State
----------------------------------------------------
- server1 shut off
- server2 shut off
- server3 shut off
[[email protected] ~]# virsh start server1
Domain server1 started
[[email protected] ~]# virsh start server2
Domain server2 started
[[email protected] ~]# virsh start server3
Domain server3 started
[[email protected] ~]# virsh list --all
Id Name State
----------------------------------------------------
1 server1 running
2 server2 running
3 server3 running
[[email protected] ~]# exit
logout
Connection to 192.168.1.31 closed.
[email protected]:/home/hairui# excit
excit:未找到命令
[email protected]:/home/hairui# exit
exit
[email protected]:~$ ssh [email protected].168.1.20
The authenticity of host '192.168.1.20 (192.168.1.20)' can't be established.
ECDSA key fingerprint is SHA256:KHP9RXd/f2XkwmgV3wrQVNRMNzxsiltT6RFma2NTC1U.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.20' (ECDSA) to the list of known hosts.
Last login: Mon Dec 10 14:32:50 2018 from 192.168.1.88
[[email protected] ~]# ^C
[[email protected] ~]#
上一篇: rsync+inotify
下一篇: gzip压缩与解压缩
推荐阅读
-
ssh:connect to host localhost port 22: Connection refuse解决
-
connect to host slavenode1 port 22: No route to host
-
master: ssh: connect to host master port 22: Connection refused
-
ssh: connect to host ip port 22: Network is unreachable
-
ssh: connect to host 10.224.120.107 port 22: No route to host
-
ubuntu: ssh: connect to host ubuntu port 22: No route to host
-
ssh: connect to host github.com port 22: Connection timed out
-
ssh: connect to host gitlab.com port 22: Connection timed out
-
Ubuntu SSH - ssh: connect to host ****** port 22: Connection refused
-
ssh: connect to host github.com port 22: Connection timed out的解决方法