Cant access into ubuntu server using putty in virtualbox
Solution 1
The eth0
interface is the NAT one. It only allows outgoing traffic by default.
In order to access the VM through a bridged interface, there should be an eth1
entry in your ifconfig output. Double check you properly enabled and configured the second NIC in VirtualBox.
Alternatively, you can also stay with NAT only and configure port forwarding: https://www.virtualbox.org/manual/ch06.html#network_nat
Solution 2
As you are using Ubuntu Server you need to manually create network interface to get eth1. To do so follow these steps below,
Go to: sudo nano /etc/network/interfaces
-
Add the eth1 to the file you opened in above step:
auto eth1iface eth1 inet dhcp
close the file by pressing ctrl + X and save it by pressing y while closing( Or you can use your own editor which you like, I used nano editor)
Reboot your system and your new eth1 will be available now.
Now from your vm use ifconfig and now your eth1 address
go to putty and and use eth1 address and login
Note if still not works try to install ssh server in your VM and try again. Command is given below:
Related videos on Youtube
Comments
-
rakibtg over 1 year
I have ubuntu server installed in virtualbox and the host os is windows 7.
I need to access into that ubuntu server using putty.
Now the way to access via putty is to, have two adapter in virtual box one should be NAT and another one should be Bridged Adapter everything is fine and in my virtual server there is internet connection as well, to check the internet i use this in my ubuntu server:wget http://www.google.com
And it successfully downloads a
index.html
page on the directory.
But once i write in ubuntu terminalifconfig
then it dosen't show a working IP address that i can access via putty. And when i try with that ip via putty it shows error :/ What's wrong with this? Thanks