2

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 terminal

ifconfig

then it dosen't show a working IP address that i can access via putty. enter image description here And when i try with that ip via putty it shows error :/ enter image description here enter image description here What's wrong with this? Thanks

2 Answers 2

4

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

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 eth1

    iface 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:

sudo apt-get install openssh-server

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .