1. 程式人生 > >The authenticity of host 'ip (ip)' can't be established.

The authenticity of host 'ip (ip)' can't be established.

進行 authent http 一個 sha256 測試 sha 如果 sel

問題

The authenticity of host ‘10.4.172.67 (10.4.172.67)‘ can‘t be established.
ECDSA key fingerprint is SHA256:G35i5rnAi7lG5MI5T3k+eFYrZQjWXvxhoO55CAcUIhs.
ECDSA key fingerprint is MD5:9e:ca:1e:09:96:46:5c:84:83:bc:bc:04:05:54:f7:54.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘10.4.172.67‘ (ECDSA) to the list of known hosts.

我的解決方法:

往常是好使狀態突然今天ssh連不上某一臺服務器了,但是連接其他的服務器沒有問題,

可能是某天在本地生成了公鑰私鑰的問題,我解決的方法是在/root/.ssh目錄建立一個bak目錄。

把id_rsa,id_rsa.pub移動到bak目錄下。然後重啟sshd服務

網上解決方法

解決辦法:

ssh -o StrictHostKeyChecking=no [email protected]

輸入密碼,鏈接成功

所下它的三種配置值:
1.
StrictHostKeyChecking=no
#最不安全的級別,當然也沒有那麽多煩人的提示了,相對安全的內網測試時建議使用。如果連接server

的key在本地不存在,那麽就自動添加到文件中(默認是known_hosts),並且給出一個警告。
2.
StrictHostKeyChecking=ask #默認的級別,就是出現剛才的提示了。如果連接和key不匹配,給出提示,並拒絕登錄。
3.
StrictHostKeyChecking=yes #最安全的級別,如果連接與key不匹配,就拒絕連接,不會提示詳細信息。
對於我來說,在內網的進行的一些測試,為了方便,選擇最低的安全級別。在.ssh/config(或者/etc/ssh/ssh_config)中配置:

StrictHostKeyChecking no
UserKnownHostsFile /dev/null

技術分享圖片

The authenticity of host 'ip (ip)' can't be established.