プログラマーの調べ物

プログラマーが調べ物をするときに役に立つサイトを作ります。

"Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host's fingerprint to your known_hosts file to manage this host."

Ansibleで以下のようなエラーが出たときは、一度sshでログインして、fingerprintを残しておけばOK。

TASK [Gathering Facts] ********************************************************************************************
fatal: [app1]: FAILED! => {"failed": true, "msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.  Please add this host's fingerprint to your known_hosts file to manage this host."}

「Are you sure you want to continue connecting (yes/no)? yes」 にyesで答えればよい。

ssh 192.168.62.128
The authenticity of host '192.168.62.128 (192.168.62.128)' can't be established.
ECDSA key fingerprint is a1:a8:f5:ac:5a:27:48:d1:38:fd:56:30:9e:3c:0a:f9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.62.128' (ECDSA) to the list of known hosts.
sysmgr@192.168.62.128's password:
Last login: Mon Jul 17 17:01:42 2017 from 192.168.62.1
[sysmgr@localhost ~]$ ログアウト
Connection to 192.168.62.128 closed.

fingerprintフィンガープリントとは、デジタルコンテンツの同一性を確認するために使用される値のこと。