Created
September 18, 2011 13:16
-
-
Save lambdalisue/1225059 to your computer and use it in GitHub Desktop.
VirtualBox SSH Connection
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
#!/bin/bash | |
echo "Please input your virtual machine name" | |
read NAME | |
SSH=2222 | |
HTTP=8080 | |
# SSH | |
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/Protocol" TCP | |
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/GuestPort" 22 | |
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/HostPort" $SSH | |
# HTTP | |
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/Protocol" TCP | |
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/GuestPort" 80 | |
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/HostPort" $HTTP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment