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
//ubuntu系統中的SSH服務端口22