<div>Hi,</div><div><br></div><div>Looking at the code, the key argument is there for historical reasons, the</div><div>login option should be used instead as it generates a properly formatted</div><div>password and ONE_AUTH file, and it supports several auth methods ssh,</div>
<div>x509...</div><div><br></div><div>That's the reason for having this command not updated to the new auth</div><div>classes, and so the bug in 'key'.</div><div><br></div><div>I'll upload the fix so it will work and deprecate the command option so we</div>
<div>will finally remove it in 4.0.</div><div><br></div><div>Thanks!</div><div><br></div><div>Ruben</div><br><div class="gmail_quote">On Fri, Jul 27, 2012 at 11:21 AM, Daniel Molina <span dir="ltr"><<a href="mailto:dmolina@opennebula.org" target="_blank">dmolina@opennebula.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div><div class="h5"><br>
On 26 July 2012 01:41, Rogier Mars <<a href="mailto:rogier@fortytwo.nl">rogier@fortytwo.nl</a>> wrote:<br>
> I just upgrade to opennebula 3.6 (from the rpm's for CentOS) and decided to give ssh authentication a try. While following the documentation the step to output the public key failed:<br>
><br>
> [root@cloudcontroller1 rogierm]# oneuser key<br>
> Enter PEM pass phrase:<br>
> /usr/bin/oneuser:250: undefined method `public_key' for #<SshAuth:0x7ffc04405ff8> (NoMethodError)<br>
> from /usr/lib/one/ruby/cli/command_parser.rb:173:in `call'<br>
> from /usr/lib/one/ruby/cli/command_parser.rb:173:in `run'<br>
> from /usr/lib/one/ruby/cli/command_parser.rb:79:in `initialize'<br>
> from /usr/bin/oneuser:36:in `new'<br>
> from /usr/bin/oneuser:36<br>
><br>
> I had a quick look at the code and method "public_key" that is referenced in oneuser line 250 does not exist in the file /usr/lib/one/ruby/ssh_auth.rb. There is a method password that seems to print the public key. I've changed line 250 in oneuser to the following:<br>
><br>
> # puts sshauth.public_key<br>
> puts sshauth.password<br>
><br>
> When I run "oneuser key" now the correct public key is displayed.<br>
<br>
</div></div>Indeed, that is a bug. I have opened a bug to fix it:<br>
<a href="http://dev.opennebula.org/issues/1396" target="_blank">http://dev.opennebula.org/issues/1396</a><br>
<br>
Thanks for your feedback<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Daniel Molina<br>
Project Engineer<br>
OpenNebula - The Open Source Solution for Data Center Virtualization<br>
<a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:dmolina@opennebula.org">dmolina@opennebula.org</a> | @OpenNebula<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Ruben S. Montero, PhD<br>Project co-Lead and Chief Architect<br>OpenNebula - The Open Source Solution for Data Center Virtualization<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:rsmontero@opennebula.org" target="_blank">rsmontero@opennebula.org</a> | @OpenNebula<br>