Reliably configured instances of EC2 will include the SSH fingerprint on the server console output , which you can get via SSL before trying to connect through SSH.Then when you connect via SSH, you need to make sure the fingerprint matches the console. You MUST do this in order to be able to securely connect to public EC2 instances.
Open EC2 instances generate a new server SSH key at each boot. This means that if you do not do what I described above, you will encounter an unknown warning of the master key, and if you ignore this warning, you will throw protection from the door; you just donβt know what you will be connecting to.
source share