<div dir="ltr">Melanie,<div><br></div><div> Thanks a lot for your help.</div><div>I tried the command <b>" ssh-keygen -q -l -f id_rsa.pub" (id_rsa.pub was generated by ssh-keygen before)</b></div><div>It ran without throwing any error.</div>
<div>The output was:</div><div><b>the fingerprint id_rsa.pub (RSA)</b><br><br><div class="gmail_quote">On Mon, Oct 22, 2012 at 3:40 PM, Melanie Witt <span dir="ltr"><<a href="mailto:melwitt@yahoo-inc.com" target="_blank">melwitt@yahoo-inc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looking at the source for handling of the public key (<a href="https://github.com/openstack/nova/blob/stable/essex/nova/api/openstack/compute/contrib/keypairs.py#L108" target="_blank">https://github.com/openstack/<u></u>nova/blob/stable/essex/nova/<u></u>api/openstack/compute/contrib/<u></u>keypairs.py#L108</a>), it's failing at generating the fingerprint for your key. Then if you look at the code for that (<a href="https://github.com/openstack/nova/blob/stable/essex/nova/crypto.py#L119" target="_blank">https://github.com/openstack/<u></u>nova/blob/stable/essex/nova/<u></u>crypto.py#L119</a>) you see the underlying command "ssh-keygen -q -l -f <public key file>". Maybe you can get to the root of the problem with your key by running that command manually.<br>
<br>
Melanie<div class="im"><br>
<br>
On 10/22/12 2:42 PM, Pavan Kulkarni wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
Hi all,<br>
<br>
I am trying to add a ssh keypair in Openstack Essex on RHEL.<br>
I have id_rsa.pub which i use to create the keypair<br>
<br>
But when i run the command<br></div>
*nova keypair-add --pub_key id_rsa.pub mykey*<br>
*I get an error as follows*<br>
*"ERROR: KeyPair data is invalid (HTTP 400)"*<br>
*<br>
*<div class="im"><br>
I recreated the public key etc, but did'nt help<br>
Any idea regarding this error is appreciated.Thanks<br>
<br>
<br>
--<br>
<br>
--With Regards<br>
Pavan Kulkarni<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><br></div>--With Regards<br>Pavan Kulkarni</div><br>
</div></div>