VirtualBox (Oracle)
ssh (port forwarding)
If you do not want to have the machine attackable in the normal network you will set the network as NAT. If you now want to connect to services of the machine, you'd have to know the current IP. You can circumvent this problem.
machine/Settings/Network/Advanced/Port Forwarding
Name | Protocol | Host IP | Host Port | Guest IP | Guest Port |
---|---|---|---|---|---|
ssh | TCP | 127.0.0.1 | 40022 | (empty) | 22 |
Headless start
When you don't want to use the machine via the view opened by VirtualBox but instead with RDP or ssh, then you don't want an extra window to be opened when you start a VM. Headless start (selectable with the combo of the "play" button) can be set as the default, so you don't have to select "headless" in the list each time you start a VM.
You set a directory for your VMs.
There you will find a .vbox for each VM.
In the .vbox search for
<Clipboard/> <GuestProperties>
Add <Frontend> like in the following sample:
<Clipboard/> <Frontend> <Default type="headless"/> </Frontend> <GuestProperties>
The exact spot is not important. What is important is that the entry has this level.