SSH Access Permission denied

asked 2014-01-14 10:23:59 -0500

Brenne gravatar image

updated 2014-01-15 03:39:10 -0500

Hello, I have a VM with Ubuntu 12.04 and devstack up and running.
Now I want to create an ubuntu instance and ssh into it. I downloaded the current image from http://cloud-images.ubuntu.com/precise/current/ . I uploaded this image via the dashboard to openstack. Next I launched an instance based on this image with a keypair I created and added also via the dashboard before.
The instance is up. I can ping it and ssh seems also to be working but I always get the error Permission denied (publickey). If I view the log I see the instance creates ssh keypairs on the first boot. I also launched the instance via command line (nova boot) - same.

Before the instance creates ssh keypairs on first boot following warning occurs:

cloud-init start running: Wed, 15 Jan 2014 09:31:53 +0000. up 98.75 seconds
found data source: DataSourceConfigDrive [net,ver=2][source=/dev/sr0]
2014-01-15 09:31:57,082 - __init__.py[WARNING]: Unhandled non-multipart userdata ''

Therefore I suppose my public key isn't pushed / injected into the instance with the help of cloud init. But I also tried to create the instance with nova boot and pass userdata (especially the ssh key) via the argument --user-data.

edit retag flag offensive close delete

Comments

Can you check that the keypair shows with the correct public key hash?

Sascha Vogt ( 2014-01-14 10:57:55 -0500 )edit

According to the log the keypairs which are created on the first boot are different (i.e. public key is different). But - how far I understand it - it is enough when the public key, which I created, is in authorized_keys, isn't it? But I also don't now if this is the case :-(

Brenne ( 2014-01-14 14:29:58 -0500 )edit

I meant: If you check the public key fingerprint (e.g by loading the public key into puttygen) and compare it to the output of "nova keypair-list" - do they match? Also are you sure, you're using the right private key to the public key you added to Nova?

Sascha Vogt ( 2014-01-15 02:12:51 -0500 )edit

The public key in my VM is the same to the output of nova keypair-list (compared wit ssh-keygen -l). Therfore I suppose that this public key isn't pushed/injected in the instance. I will edit my questions with futher details.

Brenne ( 2014-01-15 03:36:20 -0500 )edit