Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-26-2014, 05:06 AM
|
#1
|
Member
Registered: Mar 2009
Distribution: Lubuntu 13.10
Posts: 40
Rep:
|
SSH'ing to multiple virtualbox guests
I am fairly knowledgeable on the Cli but I'm a total noob with networking.
I got a networking tutorial that requires 3 virtualbox guests to be setup in an internal network (A is setup as NAT and Internal network with B and C setup as Internal network). I've just started it and still getting my head round the concepts of networking but I thought it would make it a bit easier if I could ssh into all 3 guests from the cli of my Ubuntu host using GNU Screen or Byoubu rather than having to Alt+Tab to each guest.
I have openssh-server installed on guests A, B and C and when all guests are set to NAT only I have access them through host by following command:
ssh -p 3022 hosta@127.0.0.1
However when I change the guests to network settings described above, I am unable to ssh into them from my host. Is this possible?
For info: Here is the settings for each guest:
HostA:
Quote:
Name: HostA
Groups: /
Guest OS: Debian
UUID: 8c8f0d96-9373-440a-8f7c-23e1e8615a83
Config file: /home/mine/virtual_box/HostA/HostA.vbox
Snapshot folder: /home/mine/virtual_box/HostA/Snapshots
Log folder: /home/mine/virtual_box/HostA/Logs
Hardware UUID: 8c8f0d96-9373-440a-8f7c-23e1e8615a83
Memory size: 384MB
Page Fusion: off
VRAM size: 12MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 1
Synthetic Cpu: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: off
PAE: off
Time offset: 0ms
RTC: UTC
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging: on
Large Pages: off
VT-x VPID: on
State: running (since 2014-01-26T09:54:18.108000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Storage Controller Name (0): IDE
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): SATA
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 1
Storage Controller Bootable (1): on
IDE (1, 0): Empty
SATA (0, 0): /home/mine/virtual_box/HostA/HostA.vdi (UUID: 88fc3bbc-c678-4868-9913-bf4498e455b9)
NIC 1: MAC: 080027071387, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 1 Rule(0): name = ssh, protocol = tcp, host ip = , host port = 3022, guest ip = , guest port = 22
NIC 2: MAC: 080027592C32, Attachment: Internal Network '1', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: PulseAudio, Controller: AC97)
Clipboard Mode: disabled
Drag'n'drop Mode: disabled
Video mode: 720x400x0
VRDE: disabled
USB: enabled
EHCI: disabled
USB Device Filters:
<none>
Available remote USB devices:
<none>
Currently Attached USB Devices:
<none>
Bandwidth groups: <none>
Shared folders: <none>
VRDE Connection: not active
Clients so far: 0
Guest:
Configured memory balloon size: 0 MB
OS type: Debian
Additions run level: 0
Guest Facilities:
Facility "Seamless Mode": not active (last update: 2014/01/26 09:54:18 UTC)
Facility "Graphics Mode": not active (last update: 2014/01/26 09:54:18 UTC)
|
HostB:
Quote:
Name: HostB
Groups: /
Guest OS: Debian
UUID: 560f529b-bb7c-4fe9-9609-98da8d5f6164
Config file: /home/mine/virtual_box/HostB/HostB.vbox
Snapshot folder: /home/mine/virtual_box/HostB/Snapshots
Log folder: /home/mine/virtual_box/HostB/Logs
Hardware UUID: 560f529b-bb7c-4fe9-9609-98da8d5f6164
Memory size: 384MB
Page Fusion: off
VRAM size: 12MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 1
Synthetic Cpu: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: off
PAE: off
Time offset: 0ms
RTC: UTC
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging: on
Large Pages: off
VT-x VPID: on
State: running (since 2014-01-26T09:53:19.279000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Storage Controller Name (0): IDE
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): SATA
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 1
Storage Controller Bootable (1): on
IDE (1, 0): Empty
SATA (0, 0): /home/mine/virtual_box/HostB/HostB.vdi (UUID: 98f95e55-da99-46f0-8544-7a8b6f3657bc)
NIC 1: MAC: 08002711D0E4, Attachment: Internal Network '1', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2: MAC: 080027D3D627, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2 Rule(0): name = ssh, protocol = tcp, host ip = , host port = 3022, guest ip = , guest port = 22
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: PulseAudio, Controller: AC97)
Clipboard Mode: disabled
Drag'n'drop Mode: disabled
Video mode: 720x400x0
VRDE: disabled
USB: enabled
EHCI: disabled
USB Device Filters:
<none>
Available remote USB devices:
<none>
Currently Attached USB Devices:
<none>
Bandwidth groups: <none>
Shared folders: <none>
VRDE Connection: not active
Clients so far: 0
Guest:
Configured memory balloon size: 0 MB
OS type: Debian
Additions run level: 0
Guest Facilities:
No active facilities.
|
Quote:
Name: HostC
Groups: /
Guest OS: Ubuntu
UUID: 736a06bf-9e2b-400c-8ddf-8ab4439769bc
Config file: /home/mine/virtual_box/HostC/HostC.vbox
Snapshot folder: /home/mine/virtual_box/HostC/Snapshots
Log folder: /home/mine/virtual_box/HostC/Logs
Hardware UUID: 736a06bf-9e2b-400c-8ddf-8ab4439769bc
Memory size: 512MB
Page Fusion: off
VRAM size: 12MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 1
Synthetic Cpu: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: off
PAE: on
Time offset: 0ms
RTC: UTC
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging: on
Large Pages: off
VT-x VPID: on
State: powered off (since 2014-01-26T09:51:09.766000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Storage Controller Name (0): IDE
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): SATA
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 1
Storage Controller Bootable (1): on
IDE (1, 0): /usr/share/virtualbox/VBoxGuestAdditions.iso (UUID: 0f2f8f6c-3e78-4939-b60e-ef68346dce8f)
SATA (0, 0): /home/mine/virtual_box/HostC/HostC.vdi (UUID: 5f9907e2-cd5c-4a9e-8157-5a80e9cd4242)
NIC 1: MAC: 08002715C732, Attachment: Internal Network '1', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: PulseAudio, Controller: AC97)
Clipboard Mode: disabled
Drag'n'drop Mode: disabled
VRDE: disabled
USB: enabled
EHCI: disabled
USB Device Filters:
<none>
Available remote USB devices:
<none>
Currently Attached USB Devices:
<none>
Bandwidth groups: <none>
Shared folders: <none>
VRDE Connection: not active
Clients so far: 0
Guest:
Configured memory balloon size: 0 MB
|
Last edited by alsaf; 01-26-2014 at 04:21 PM.
|
|
|
01-26-2014, 04:23 PM
|
#2
|
Member
Registered: Mar 2009
Distribution: Lubuntu 13.10
Posts: 40
Original Poster
Rep:
|
Found solution.
For instance if you want to ssh from hostA to hostC, you would go into hostc and get IP address via
In hostA you simply ssh into it via the following:
Quote:
ssh -p 22 hostc@192.168.1.18
|
|
|
|
All times are GMT -5. The time now is 08:15 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|