LinuxQuestions.org
Visit Jeremy's Blog.
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 01-26-2014, 05:06 AM   #1
alsaf
Member
 
Registered: Mar 2009
Distribution: Lubuntu 13.10
Posts: 40

Rep: Reputation: 0
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.
 
Old 01-26-2014, 04:23 PM   #2
alsaf
Member
 
Registered: Mar 2009
Distribution: Lubuntu 13.10
Posts: 40

Original Poster
Rep: Reputation: 0
Found solution.

For instance if you want to ssh from hostA to hostC, you would go into hostc and get IP address via
Quote:
ip addr
In hostA you simply ssh into it via the following:
Quote:
ssh -p 22 hostc@192.168.1.18
 
  


Reply


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
[SOLVED] How to enable networking between two Scientific Linux virtual guests in VirtualBox? infinite_scale Linux - Virtualization and Cloud 4 03-20-2012 02:41 AM
[SOLVED] VirtualBox: how to start and shutdown guests VMs on startup matiasar Linux - Software 3 06-23-2010 10:01 AM
vmware vs virtualbox networking benchmarks (mostly windows 7 guests) mrtwice Linux - Virtualization and Cloud 0 12-20-2009 03:44 PM
All my guests crash on Fedora 11 with VirtualBox green_dood Linux - Software 2 05-28-2009 03:37 PM
LXer: VirtualBox 2: How To Pass Through USB Devices To Guests On An Ubuntu 8.10 Host LXer Syndicated Linux News 0 04-05-2009 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:15 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration