0

I am running two Hortonworks Sandbox 1.3 guest VMs (both running Centos 6) on a Windows 7 host. I am using Oracle VirtualBox 4.3.2 with host-only adapter added to each of the guest VMs in addition to their default NAT adapter. I have enabled DHCP server in Preferences --> Network --> Host-only Networks --> DHCP Server with specifications as follows:

Enable Server: Checked
Server Address: 192.168.56.100
Server Mask: 255.255.255.0
Lower Address Bound: 192.168.56.101
Upper Address Bound: 192.168.56.254

On launching both the guest VMs, it says that the guest can be SSHed on 127.0.0.1:2222 as shown in screenshot here: enter image description here

I want to use putty SSH client to open terminals for the two different guest VMs. But the problem is I can only SSH successfully to the 127.0.0.1:2222 in either new connection. This restricts me to SSH to only a single guest instance at present.

How should I create two different SSH connections using my putty client for the two guest VMs?

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Wireless-N 1030
   Physical Address. . . . . . . . . : XX-XX-XX-XX-XX-X1
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : xxNN::NNNN:NNxN:xNNN:xxNN%11(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.2(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Friday, November 29, 2013 3:14:48 PM
   Lease Expires . . . . . . . . . . : Saturday, November 30, 2013 3:14:52 PM
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DHCPv6 IAID . . . . . . . . . . . : NNNNNNNN0
   DHCPv6 Client DUID. . . . . . . . : NN-NN-NN-NN-NN-XX-XN-XN-NN-XN-XX-NN-XX-X0

   DNS Servers . . . . . . . . . . . : 192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
   Physical Address. . . . . . . . . : XX-XX-XX-XX-XX-X2
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : xxNN::xN:NNNN:xNNN:NxxN%24(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : NNNNNNNN1
   DHCPv6 Client DUID. . . . . . . . : NN-NN-NN-NN-NN-XX-XN-XN-NN-XN-XX-NN-XX-X1

   DNS Servers . . . . . . . . . . . : xxxN:N:N:xxxx::1%1
                                       xxxN:N:N:xxxx::2%1
                                       xxxN:N:N:xxxx::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter VirtualBox Host-Only Network #2:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter #2
   Physical Address. . . . . . . . . : XX-XX-XX-XX-XX-X3
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : xxNN::xxxN:NNNN:xNxx:NNNx%26(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.43.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : NNNNNNNN2
   DHCPv6 Client DUID. . . . . . . . : NN-NN-NN-NN-NN-XX-XN-XN-NN-XN-XX-NN-XX-X2

   DNS Servers . . . . . . . . . . . : xxxN:N:N:xxxx::1%1
                                       xxxN:N:N:xxxx::2%1
                                       xxxN:N:N:xxxx::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

My scenario is best described through the image below or Is that my understanding of the network architecture is mistaken? Can somebody please explain and help me get SSH access to the two guest VMs.

enter image description here

1
  • @PeterHorvath: I didn't know the system was complex and its first time I am setting up such a config. Also, I am not 100% sure about all the network terminologies and so my question may sound novice and archaic. But that's the way to learn, don't you think so? Can you suggest what better way I could have asked this? I mean I have even tried to explain with diagram to explain the things I may not be able to explain in words. Pls be specific before you downvote a ques Commented Nov 30, 2013 at 21:37

1 Answer 1

1

You can't. You need to modify something - the easiest something to modify is probably your SSH config - maybe you can modify ssh to listen on an alternative port (maybe by modifying /etc/ssh/sshd on the hosts and restarting it), and/or modifying the ListenAddress so it binds to all interfaces so you can access it by IP address.

[ I can only speculate the exact steps you need to take - they will depend on your specific configuration. I suspect you will actually need to enable SSh on the machines, and that your SSH sessions on port 2222 are something set up by Virtualbox with some kind of forwarding. - I don't use Virtualbox though]

The reason why looking in your network configs to have 2 x 127.0.0.1 connections won't help with respect to "127.0.0.1" is that 127.0.0.1 ALWAYS refers to "This machine", thus there is no way to connect to these.

2
  • I hope the SSH is already enabled in both the guests since the message (in Sandbox screenshot attached) clearly shows that. Is there a way I can do simply port forwarding? If so, how should I configure putty given the above IP configurations? Else, will it be better if I use bridged adapter instead of host-only to circumvent the Host Machine's Network Adapter? Commented Nov 30, 2013 at 5:45
  • Sorry, I don't know the specifics of your VM setup so I can't advise.
    – davidgo
    Commented Nov 30, 2013 at 8:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .