Ask Your Question

Keypair creation is failing

asked 2014-01-17 23:55:19 -0500

Hokam Singh gravatar image

updated 2014-01-18 09:26:19 -0500

As per the openstack deployment guide, i followed the below instructions to create keypair but it is failing.

$ ssh-keygen
$ cd .ssh
$ nova keypair-add --pub_key mykey

As i am running the last command to add keypair, it is failing with below error :
ERROR: Keypair data is invalid: failed to generate fingerprint (HTTP 400) (Request-ID: req-8926bb92-34f0-47b7-9f3a-b2012796383b)

How can i resolve the issue?

Any help will be appreciated. Thanks in advance.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-01-19 03:39:26 -0500

darragh-oreilly gravatar image

Have a look in nova-api.log, there maybe more specific error details. Nova-api runs ssh-keygen -q -l -f to get the fingerprint. I guess this command will work on the host where the keypair was created - can you add the output to the question. But for some reason it is not working of the host running nova-api. Maybe they have different versions of ssh.

edit flag offensive delete link more


Hi, Thanks for the response. I am getting below output for the ssh-keygen -q -l -f command: 2048 06:0a:12:6f:92:2c:09:ca:6f:d0:17:9b:5d:eb:ab:fd (RSA). The above command is working fine but the nova keypair-add command is failing. Please help.

Hokam Singh gravatar imageHokam Singh ( 2014-01-19 04:35:12 -0500 )edit

What does nova-api.log say? Try copying onto the machine running nova-api and running the command there.

darragh-oreilly gravatar imagedarragh-oreilly ( 2014-01-19 08:19:31 -0500 )edit

answered 2015-03-02 10:34:25 -0500

l6unchpad gravatar image

I found that what fixed this for me was to create a new public key from the private key:

ssh-keygen -y -f private_key.pem >

I then used the newly generated key in the nova request, which worked just fine.

edit flag offensive delete link more


Great, it worked perfectly for me!

d3an-meehan gravatar imaged3an-meehan ( 2015-08-07 03:50:43 -0500 )edit

answered 2015-10-15 07:17:55 -0500

ansiwen gravatar image

I found out in my case, that the key file had comments at the beginning, which nova keypair-add didn't like. After removing the comments it worked.

edit flag offensive delete link more


yep, 3 '#' comments at the top of the authorized_keys file confused nova. it's probably a parsing bug.

eshedg gravatar imageeshedg ( 2015-12-21 06:26:51 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-01-17 23:55:19 -0500

Seen: 4,828 times

Last updated: Jan 19 '14