LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-29-2013, 10:55 PM   #1
chakra1
LQ Newbie
 
Registered: Nov 2013
Posts: 15

Rep: Reputation: Disabled
How to configure putty to ssh to multiple vm using same host


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:

Code:
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 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?

Code:
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 attached image with this thread. 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.
Attached Images
File Type: jpg SSH Access to Multiple Guest VMs.jpg (74.5 KB, 6 views)
 
Old 11-30-2013, 06:29 PM   #2
rigor
Member
 
Registered: Sep 2011
Posts: 153

Rep: Reputation: Disabled
Hi chakra1,

I'm not entirely clear on your explanation of your set up. But I have used various versions of VirtualBox successfully.

Using a Host-Only adapter I would normally get an IP address in the same subnet for both the guest and the host. For the VirtualBox I have running right now, the adapter on the Linux side is vboxnet0 with an IP address of 192.168.56.1, while on the Windows side it's "Ethernet adapter Local Area Connection 2" with an IP address of 192.168.56.101.

So if I wish to use ssh on Linux to connect to the Windows machine, I use the IP address 192.168.56.101, if I wish to use putty on Windows to connect to the Linux machine, I use the IP address 192.168.56.1. I have the VirtualBox DHCP Server configured as yours is. I don't know where you're getting the 127 address, or the 192.168.43 subnet.

I hope this is of some help with the basics. Beyond that, when in doubt, packet sniff. I would hope that wouldn't be tough with the Host-Only adapters, but if somehow the Internet Router is causing some/all of the confusion, that's the sort of possibility for which I keep an old and cheap, "dumb" hub around, not a "LAN switch"/etc., and I also keep extra NIC's, so I can "eavesdrop" on packet traffic between 2 or more separate physical devices.
 
  


Reply

Tags
dhcp server, ssh access, virtual box, virtual network


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Ubuntu server remote ssh and local network ssh issues using putty. scottpops Linux - Server 8 05-17-2012 06:07 PM
SSH Putty "Server's host key did not match the signature supplied" bala150985 Linux - Networking 18 02-02-2012 12:42 PM
[SOLVED] putty ssh works but ssh from terminal does not felixtheratruns Linux - Server 6 04-29-2010 01:01 PM
LXer: How To Configure SSH Keys Authentication With PuTTY And Linux Server In 5 Quick LXer Syndicated Linux News 0 06-29-2009 01:20 PM
how to configure SSH to allow or deny specify host(ip address). hocheetiong Linux - Newbie 9 01-17-2008 02:40 PM


All times are GMT -5. The time now is 02:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration