How to log into a VirtualBox from the main OS?

Discussions about using Linux guests in VirtualBox.
Post Reply
Alain Reve
Posts: 11
Joined: 1. Nov 2018, 14:12

How to log into a VirtualBox from the main OS?

Post by Alain Reve »

Hi everyone,

I need to train myself to create tunnels and stuff like that, for a job.
So I set up VirtualBox and I plan to run on it my usual OS, currently Kubuntu 18.10
I guess that to login I would need to type something like
ssh myself@VM
but I have no idea how to set up the VM or my native system to enable such a connection.

All suggestions welcome (except "get another job", if you would be so kind ;) )
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: How to log into a VirtualBox from the main OS?

Post by socratis »

You need to establish a network connection of sorts between your host and your guest. Read the following: User Manual, ch. 6.2. Introduction to networking modes including the Overview table, which shows quickly what kind of connection is required to achieve what you want. And remember, you can always have more than one network card in your guest to cover multiple scenarios.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Alain Reve
Posts: 11
Joined: 1. Nov 2018, 14:12

Re: How to log into a VirtualBox from the main OS?

Post by Alain Reve »

Thank you Socratis.

I don't understand the "more than one one network card" but maybe I will after I have read the chapter you suggest.
I'm new to virtual stuff, so to me this sounded like a suggestion to open up the case of the machine and plug in an extra bit of hardware. Being able to do this virtually is strange to me, but seems interesting.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: How to log into a VirtualBox from the main OS?

Post by socratis »

"Virtual" hardware means that you open the "virtual" case of the machine (the settings) and you plug an extra bit of "virtual" hardware (an extra network adapter from the settings).

Or in other terms, you shut down the VM, go to the VM Settings » Network. You have up to 4 network cards available from the GUI. You can enable one or more of them. You can have the 1st one "Attached to" the NAT network (which is the default) so that you can have easy Internet access from within the VM, and the 2nd one "Attached to" the HostOnly network so you can establish a connection between your host and your guest.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Alain Reve
Posts: 11
Joined: 1. Nov 2018, 14:12

Re: How to log into a VirtualBox from the main OS?

Post by Alain Reve »

I'll try with the basic settings first...

Both machines run Kubuntu. To launch the window where can start virtualbox, I type "virtualbox". Then I select my virtualbox and click "start".
Then I open another terminal (they're called "Konsole" in Kubuntu).

When I type :
ssh KubeVM
It says :
ssh: Could not resolve hostname kubevm: Name or service not known

(kubevm is the name I gave to the virtualbox)

I also tried "ssh virtualbox" and variants.
Post Reply