VirtualBox 預設伺服器名字是ubuntu_server
VBoxManage setextradata ubuntu_server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
VBoxManage setextradata ubuntu_server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
//這個端口可以自由設定
VBoxManage setextradata ubuntu_server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
//ubuntu系統中的SSH服務端口22
通過dos指令終端修改VirtualBox 伺服器名字是ubuntu
在安裝virtualBox 下通過dos指令終端分别輸入三行指令
VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22