Opensuse - Virtualbox - ssh to virtualbox

Good Evening Everyone,

I have virtualbox installed on opensuse-1, with opensuse-2 installed in virtual boxed,

opensuse-2 is Bridged to opensuse-1

How do I ssh to opensuse-2 from opensuse-1 please

All the best from Alan

open the port for ssh on the second, also start and enable sshd on the second, than ssh from the first to it.

Good Morning,

Thank you for the reply, I have sshd running on both instances off opensuse, how do you connect from opensuse-1 to opensuse-2 please the port numbers are the same on both

All the best from Alan

ssh username of the second@IP of the second

or with Port:
ssh -p xxx username of the second@IP of the second

Good Morning,

Ah that where the problem lies, the second opensuse is in bridge mode to the first, so It does not have an IP
if I do ifconfig there is no eth0…

All the best from Alan

I think there is some confusion here.

Most virtual networking for any virtualization running on Linux (there are exceptions like Docker) use a virtual device ofen called a Linux Bridge Device. This Linux Bridge Device supports a variety of networking configurations(typically NAT, Host-only and Bridging) but otherwise this device is <not> the same as bridging… It’s present for all types of networking.

This Linux Bridge Device is also usually bound to a physical network interface so that it has the ability to connect to a remote physical device using the physical networking interface’s network capability.

So, if you wish to set up a true bridging network configuration…
You have to create a Linux Bridge Device which is also configured with a bridging configuration. Most virtualization setups do this for you by default. If you use YAST, typically the device br0 is set up as bridging.

When you configure your Guest networking property to use a Linux Bridging Device with a bridging configuration (eg br0), then your Guest should function exactly as if it’s on your physical network… If there is DHCP on your physical network and you configure your network interface <inside> your Guest as a DHCP client, then the Guest will acquire its own unique DHCP address and lease. If you configure a static address <inside> your Guest, that’ll work, too.

TSU

As always, you can test your networking in your Guest by running

ip addr
ip route

You may also need to set up your ssh completely.
This old SDB looks like it’s still accurate except for those rcsshd commands which should be substituted with systemd commands.
https://en.opensuse.org/SDB:Configure_openSSH

TSU

Good Afternoon TSU,

Thank you for all the information, now I will go and play…

All the best from Alan

Open the Settingsin the VirtualBox Main Window for you openSUSE-VM—go to the Network-Tab and switch from NAT to bridge.

Start your openSUSE VM and set up your Network…

Thank you Sauerland

All the best from Alan

That’s true only for Virtualbox, because Virtualbox uniquely configures the NAT client to use the same IP address as the Host.

Although it’s functional, unless there is a good reason to use this unique NAT configuration, I highly recommend Guests always be configured with nat-network instead which assigns an individual IP address for each Guest. With a nat-network configuration, the Host and Guest can see each other using different IP addresses, and if you run any additional Guests also configured with nat-network, they can all see each other as well.

TSU

Good Morning TSU,

It is like a mine field, but I managed to get thought it, and now it is all working.

Thanks to everyone’s input…

All the best and thank you from Alan