July 2009

How to enable ssh access to a VirtualBox guest

< class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-teaser">

Enable ssh access to a virtualbox guest instance using VBoxManage. The guest is the guest machine name and should be quoted if the name contains spaces.

$ VBoxManage setextradata 'guest' "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
$ VBoxManage setextradata 'guest' "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
$ VBoxManage setextradata 'guest' "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

Tags: