How to ssh into a guest using NAT?
Posted: 30. May 2013, 00:15
From the OS X Terminal, I want to ssh into a Fedora Linux guest running in a VirtualBox VM. Previously I've done this by setting the guest Network panel's Attached To pop-up panel to Bridged. This causes the VM to get its own IP address assigned by the network DHCP router. However, the current network I'm on doesn't support this, it will only assign one IP per wireless connection. Setting Attached To to the default of NAT allows network connectivity to work, but now I can't ssh into the VM.
Guest OS link enp0s3 has an IP address of 10.0.2.15/24
Host OS link en1 has an IP address of 192.168.21.121 which isn't on the same subnet.
Host OS link vboxnet0 doesn't have an IP address assigned. With qemu-kvm, I'm used to the virtual link having an IP address as well, and it is possible to ssh into the guest set to NAT. I can't figure out an equivalent for VirtualBox.
Host OS X 10.8.3, VirtualBox 4.2.12.
Guest Fedora Linux 18 (or 19 beta), VirtualBox guest Network panel is Attached To: NAT (default) using the wireless connection.
Guest OS link enp0s3 has an IP address of 10.0.2.15/24
Host OS link en1 has an IP address of 192.168.21.121 which isn't on the same subnet.
Host OS link vboxnet0 doesn't have an IP address assigned. With qemu-kvm, I'm used to the virtual link having an IP address as well, and it is possible to ssh into the guest set to NAT. I can't figure out an equivalent for VirtualBox.
Host OS X 10.8.3, VirtualBox 4.2.12.
Guest Fedora Linux 18 (or 19 beta), VirtualBox guest Network panel is Attached To: NAT (default) using the wireless connection.