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?

3
  • 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. Commented Jan 1, 2014 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. Commented Jan 1, 2014 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. Commented Jan 1, 2014 at 0:49

1 Answer 1

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.