10
3
Short version
If I am running an Ubuntu guest VirtualBox VM from a Windows 10 host, what steps do I need to take to ssh
from a remote linux server into the Ubuntu guest VM?
_______________________
[ ]
[ Windows 10 ]
[ ___________________ ] ____________________
[ [ ]] [ ]
[ [ Ubuntu VM (guest) <----HOW?---- SUSE remote server ]
[ [__________________]] [___________________]
[_____________________]
Long version
I am confused because, AFAIK if I wasn't using an Ubuntu guest VM, and was instead using a real Ubuntu machine, I could just cat /etc/hosts
, find the IP address of local and then from remote just:
user@remote --ssh--> user@<local IP>
I already setup the ssh keys so that I can ssh from the Ubuntu guest into the SUSE remote server (i.e. the guest ~/.ssh/id_rsa.pub
is already stored in the remote ~/.ssh/authorized_keys
). I.e. I can already:
ssh -Y user@remote
Without difficulty, but I cannot do it the other way round simply because I have no idea what my guest's IP address is. And I already tried ssh
-ing with the IP addresses in "Connection Information" from the Ubuntu GUI.
Also to be clear:
guest VM is Ubuntu 12.04 LTS (64-bit)
VirtualBox settings mostly: default
Enable Network Adapter: NAT (cable connected, no port forwarding)
I have not set up an ssh server, but I am not sure it's necessary (?), this is my understanding so far.
So, given that I am running an Ubuntu guest VirtualBox VM from a Windows 10 host, what steps do I need to take to ssh
from a remote linux server into the Ubuntu guest VM?
I will research this thanks, I really do not know how you answered so quickly... Will delete this comment after researching – hello_there_andy – 2017-02-15T15:09:23.147
1@hello_there_andy I do a lot of virtualization on my laptop, either through Linux-based LXC/LXD containers on a NAT setup, or through VMware, with similar evils to NAT (basically, I'm used to this set of issues heh). The process is similar in Linux and Windows, but completely different in terms of steps, though in my cases my VMs don't ever need outside -> in; for those VMs, I put them on a dedicated ESXi hypervisor that is a machine dedicated to run VMs, and bridge it direct to an existing Ethernet setup (no NAT there heh). But that's an atypical setup, of course. – Thomas Ward – 2017-02-15T15:11:51.833
1@hello_there_andy just make sure the guest has
openssh-server
installed on it as well - so you can accept SSH. Outside of that, the rest is Windows networking/firewall/configuration stuff. (Hence, Super User and not Ask Ubuntu) – Thomas Ward – 2017-02-15T15:12:53.640