0

I have Ubuntu and I've installed VirtualBox in the desktop and installed CentOS but how would I go about connecting to it remotely via SSH as if I type my IP in? When I do this it just loads the Ubuntu SSH?

  • Your CentOS guest should have its own IP address on a virtual network adapter. You can change its IP to one on your local network (e.g., 192.168.0.x). See the documentation too. – dartonw Jan 1 '14 at 0:21
  • So i need to get a 2nd IP from my ISP? if i use a local IP then i can't connect remotely. – Exoon Jan 1 '14 at 0:24
  • No, you can designate a different port and do a port forward from the host's IP to a port on the Guest VM. – slm Jan 1 '14 at 0:49
1

You have 2 methods for doing what you want.

  1. Without having to get another physical IP address that is on your LAN, you can setup a port forward rule on your VirtualBox host, that will direct any traffic from say port 2222 to the port 22 of the IP address that has been designated for the VirtualBox guest.

  2. The other method is to get your guest to have an IP address like any regular system would have on your LAN, this IP would then be accessible just like the IP of your VirtualBox host.

See here for further details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.