## 19 host key verification failed: answer says the key changed and gives ssh-keygen -R # Case A: the key really changed (as in 17) $ ssh -o BatchMode=yes -p 2222 root@127.0.0.1 Host key verification failed. $ ssh-keygen -R '[127.0.0.1]:2222' # Host [127.0.0.1]:2222 found: line 1 $ ssh -o StrictHostKeyChecking=accept-new ... login-ok # Case B: a host that was never in known_hosts, in a script or CI job (BatchMode) $ ssh -o BatchMode=yes -p 2223 root@127.0.0.1 Host key verification failed. $ ssh-keygen -R '[127.0.0.1]:2223' Host [127.0.0.1]:2223 not found in /tmp/tfs/ssh/home/.ssh/known_hosts $ ssh -o BatchMode=yes -p 2223 root@127.0.0.1 (again) Host key verification failed.