0
我正在ssh-keyscan
來更新我的known_hosts
文件:SSH-鍵掃描不清晰的本地主機
» ssh-keyscan -p 5634 -t ecdsa,dsa,rsa localhost >> .ssh/known_hosts
# localhost SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
# localhost SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
# localhost SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
但後來:
» ssh localhost
The authenticity of host '[127.0.0.1]:5634 ([127.0.0.1]:5634)' can't be established.
ECDSA key fingerprint is 5f:60:a2:34:0a:57:57:bc:95:b2:29:89:11:3e:46:14.
Are you sure you want to continue connecting (yes/no)?
爲什麼?我有明確更新了ecdsa
指紋與ssh-keyscan
? (這是在known_hosts
文件,它有正確的權限,並沒有其他項可能會導致衝突)
(這對我很重要,因爲我有幾臺主機,我想自動化安裝過程,其中包括ssh本身的能力)