首先在VBox Guest中安装SSH相关软件包:

[kodango@devops ~]$ sudo pacman -S openssh

启动SSH服务,并设置为开机自动启动:

[kodango@devops ~]$ sudo systemctrl start sshd.service
[kodango@devops ~]$ sudo systemctrl enable sshd.service

设置端口转发:
ArchLinux Port Forward

通过SSH连接到指定端口:

Host 'localhost' resolved to 127.0.0.1.
Connecting to 127.0.0.1:3022...
Connection established.
Escape character is '^@]'.

WARNING! The remote SSH server rejected X11 forwarding request.
Last login: Sun Oct 21 19:57:26 2012
[kodango@devops ~]$ ls
share

virtualboxservice可以在Windows下以服务的形式启动VBox Guest。