Table of Contents

,

Virtualbox ssh forwarding

NAT network needs to be the first adapter in VM settings.

List vms:

VBoxManage list vms

Create rule:

VBoxManage modifyvm "Debian 9" --natpf1 "debian9ssh,tcp,,<hostport i.e. 5622>,,<guest port i.e. 22>"

Show port forward:

VBoxManage showvminfo "Debian 9" | grep Rule

Connect:

ssh -p 5622 root@127.0.0.1

Tested on

See also

References