ssh 報錯Host key verification failed 或Ubuntu connect to serve 失敗 一般是由於沒有裝ssh服務器
sudo apt-get install openssh-server 就能夠了,可是我這邊是由於以前連上了,後面遠程服務器改了密碼,ssh
以前保存的密碼驗證失敗,這時候就要把保存的密碼刪掉,哪裏刪掉???this
用Ubuntu connect to serve 就直接報錯,用ssh就報下面的錯,server
ssh xxx@xxx.xxx.xxx.xxxrem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Please contact your system administrator.
Add correct host key in /home/xxxxx/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/xxxxxx/.ssh/known_hosts:23
remove with: ssh-keygen -f "/home/xxxxx/.ssh/known_hosts" -R xxxx.xxxx.xxxx.xxxx
ECDSA host key for xxxx.xxxx.xxxx.xxxx has changed and you have requested strict checking.
Host key verification failed.get
其實,只要打開 /home/xxxxx/.ssh/known_hosts ,把23行的刪掉就能夠,那個是密鑰保存的,以後遠程登陸從新輸入新的密碼就能夠了it