Suppose I attempt to connect to a remote computer via SSH:
$ ssh user@example.com
The authenticity of host 'example.com (<IP address>)' can't be established.
ECDSA key fingerprint is <key fingeprint>.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
I verify that the displayed fingerprint is indeed correct, and I want to continue connecting. If I enter yes at the prompt, I will continue connecting but SSH will add the fingerprint to ~/.ssh/known_hosts
. I do not want SSH to automatically add the fingerprint to the known_hosts file. Is there a way to stop SSH from automatically adding the fingerprint to the known_hosts file if I enter yes? I want to be presented with this same prompt the next time I attempt to connect to this same host.
I am not looking for ssh -o StrictHostKeyChecking=no ...
since I want to verify the host key fingerprint (i.e. I want it to be displayed, and I want to be prompted).