Created
February 1, 2011 23:30
-
-
Save andy722/806957 to your computer and use it in GitHub Desktop.
Port forwarding for VirtualBox VM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set GUEST="Ubuntu 10.10 Server x86" | |
set MANAGE="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set GUEST="Ubuntu 10.10 Server x86 - 2" | |
set MANAGE="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" | |
%MANAGE% getextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" | |
%MANAGE% getextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" | |
%MANAGE% getextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set GUEST="Ubuntu 10.10 Server x86 - 2" | |
set MANAGE="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222 | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22 | |
%MANAGE% setextradata %GUEST% "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After executing vbox-fwd-set.bat, one can connect via ssh to localhost:2222 (from host machine) and get to VM:22