Michael Lam
asked on
How to ssh into a VM inside a windows hosting machine
I have a VirtualBox VM (ubuntu 14.04) hosted inside a windows machine. I want to ssh into the VM from an outside computer. I have the hosting window's firewall open up for port 22, but still got permission denied. I also have port forwarding set up for my VM for port 22. Can someone tell me what I am doing wrong? Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Also the the VM, I have NAT, internal network, and host-only adapter set up. For NAT, I have port forwarding set for TCP, host port 3022 and guest port 22.
What Hypervisor are you using? You must setup your VM to use bridged networking in order for it to get visible to the rest of the LAN. NAT and host only mode will make it invisible to the rest of the LAN.
ASKER
I am using virtualbox, a type 2 hypervisor. I also have a bridge network setup along with a NAT and internal network. But when I ssh or putty into the ip I got from the bridge network, it just hangs there. Do I need to create dhcp server? The company's network already has dhcp. Also the host machine, a windows server, can access other internal machines but no Internet access.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think it's the correct ip because that's the only one I see with ifconfig. The VM is Ubuntu 14.04, how do you know if NIC is correct?
in the sshd_config file you would set the ListenAddress to the IP of the NIC you want to use. But if there is only one address then that shouldn't be necessary.
ASKER