I'm trying to set up a new Amazon EC2 instance with my own public key so I can connect via ssh. I have generated an RSA key pair using ssh-keygen
as described in the aws docs, and uploaded the public key to Amazon using the web interface. The key shows up normally in my AWS dashboard. Let's say my public key fingerprint is aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa
.
I can create a new instance and specify this public key using the web interface (and yes, I specify this before spinning up the machine - it's the last step before launch). The instance appears to be created and start normally. My public key is listed under the 'Key pair name' property for that instance. I'm using an Ubuntu 12.04 LTS OS, 64 bit image: ubuntu-precise-12.04-amd64-server-20131003.
However, when I attempt to connect via ssh, I do not see the fingerprint for my key:
>The authenticity of host 'ec2-00-00-00-00.us-west-2.compute.amazonaws.com (00.00.00.00)' can't be established.
>RSA key fingerprint is bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb.
>Are you sure you want to continue connecting (yes/no)? no
(I use the actual IP address when connecting)
I can run 'ec2-get-console-output' using the ec2 command line tools, as suggested by this answer. However, my public key does not appear anywhere in the console output. There are two other keys present:
>Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
>The key fingerprint is:
>bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb:bb root@ip-00-00-00-00
>...
>-----BEGIN SSH HOST KEY FINGERPRINTS-----
>ec2: 1024 cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc root@ip-00-00-00-00 (DSA)
If my key is being deployed onto the instance, why doesn't it show up?