Page 1 of 1

Not able to access my Linux using ssh when disconnected

Posted: 27. Mar 2015, 13:20
by CesarDBA
Hello,

I am using VBox in Windows7 and installed Oracle Linux 5 as guest. I am using Bridge Adapter on network settings. When the computer is connected to the router using the ethernet cable adapter everything works fine. But I am not able to connect to the guest using ssh if my ethernet card is down. Is it the expected behavior? If it is, is there any workaround I can use to connect to my guest using ssh when the PC is disconnected, for example, when I am traveling?

Thank you in advance,
Cesar

Re: Not able to access my Linux using ssh when disconnected

Posted: 27. Mar 2015, 14:38
by Perryg
Add a second adapter set to host-only. See http://www.virtualbox.org/manual/ch06.html

Re: Not able to access my Linux using ssh when disconnected

Posted: 27. Mar 2015, 18:52
by CesarDBA
Hi,

Thank you for your reply, but it does not work as I am expecting. Imagine you have the Linux guest set as 192.168.2.122. If you set a new card, using host adapter, you are able to access your new IP provided by VBox, as for example 192.168.1.101. I am able to do a ssh to the new IP (192.168.1.101). But I want to access the Linux IP, 192.168.2.122, as this will be accessed by a browser: http://192.168.2.122. What I want is to use IP 192.168.2.122, instead to use the IP provided by VBox host adapter. I am able to access the IP when I am connected to my router, but not able to access it when my ethernet card is down. Any other workaround for this?

Regards,
Cesar

Re: Not able to access my Linux using ssh when disconnected

Posted: 27. Mar 2015, 18:59
by Perryg
You have to decide which you want to do. If you use a LAN connected access it of course will not be present when not on the LAN. The host-only is the only way to have both but the address will be different. I believe you can assign both to the web server though.