Normally, when using ssh
to connect to a host for the first time, you get a message like:
The authenticity of host 'nova.example.com (192.168.0.63)` can't be established.
ECDSA key fingerprint is XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX.
One can then check the key fingerprint against the known fingerprint for the host to make sure you're actually connecting to the host you think you are.
I am now trying to ssh into a new Amazon EC2 instance, and I cannot find the ECDSA key fingerprint that ssh is reporting anywhere in the management console.
The one fingerprint I can find is under "NETWORK & SECURITY » Key Pairs", but it does not match what ssh is reporting. As far as I can tell, this is actually a fingerprint of the private key that AWS generated for me, not the host key.
Perhaps I could just say "yes" and the run "ssh-keygen -lf" on the EC2 instance, but I'm not confident that that actually protects against man in the middle attacks. (In fact, this page on checking ssh public key fingerprints suggests exactly that possibility.)
How does one correctly verify the ECDSA key fingerprint returned by ssh when connecting to an EC2 instance?