How can I ssh from my virtual machine to the local host?
I need exact details please.
Note: Virtual machine = Ubuntu 14 Host machine = Ubuntu 16
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Using ssh from your VM to the localhost on your host machine will use the host machine address. Open a terminal on the Host (Ctrl + t) and type
look for something like inet addr:192.168.XX.XX and then ssh to that address.
Be sure to ensure your host firewall settings are going to allow ssh in from only specified addresses on port 22. Assuming you have ssh set up to listen in its default manner - You can control firewall settings in Ubuntu using the
ufw command. like this on the Host:
sudo ufw enable
sudo ufw allow proto ssh from 192.168.1.100 to 192.168.1.110 port 22
Then from your VM for example:
This type of connection happens over the network rather than through a socket on your host machine. In a scenario where you are still unable to ssh to your host machines address, check your LAN router, switch, or firewall to see if it is preventing ssh on your internal network.