Oracle VM 3: Enable Key Based Authentication to OVM CLI

January 29th, 2013 | Tags: , , , , ,

I have been spending some time learning the OVM 3 CLI since it was released in the earlier 3.x versions, however the biggest roadblock for me has always been that they only allow access via SSH on port 10000.  However now I know how to enable key based authentication for these connections opening this up for a much more robust scripting experience.

Connect to OVM CLI with Password

$ ssh -p 10000 adm...@ovmmgr.allanglesit.com
adm...@ovmmgr.allanglesit.com's password:
OVM>

Authorize Keys for OVM CLI

To allow key based authentication to OVM CLI simply add your public key on your OVM Manager Server to /home/oracle/.ssh/ovmcli_authorized_keys.  For our environment we already had everyone who needed access in the authorized_keys for root.

# cat /root/.ssh/authorized_keys >> /home/oracle/.ssh/ovmcli_authorized_keys

However if you wanted to do it remotely using the public key file directly from your client.

# cat .ssh/id_rsa.pub | ssh r...@ovmmgr.allanglesit.com "cat >> /home/oracle/.ssh/ovmcli_authorized_keys"

Connect to OVM CLI with Public Keys

Now our connection is without that pesky password prompt.

$ ssh -p 10000 adm...@ovmmgr.allanglesit.com
OVM>
Comments are closed.