Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed Ubuntu Server on a virtual machine in VirtualBox which runs on Windows 7. How can I connect through ssh to that virtual machine?

I go and type 'ifconfig', and i get this address "10.0.2.15". But when I try ssh 10.0.2.15 it can't establish the connection.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

The easiest way is to set up the network interface of the virtual machine to "Bridged mode" in virtualbox.

You do that by selecting the virtual machine (in VB) then go to settings > network, and change the attached to dropdown from NAT to bridged

After that, you virtual machine should get an IP address of your local network (similar tot he one of the host pc) and you should be able to ssh it with that IP.

share|improve this answer
    
Actually you don't need to set it up in bridged mode, but bridged mode is the easiest way to solve your issue. If you want to keep your machine in NAT, you have to do a port forward rule in your virtualbox machine NAT settings. –  tomodachi Nov 8 '12 at 23:59
    
thanks tomodachi, i updated the answer to reflect it's the easiest and not the only way –  Sam Nov 9 '12 at 1:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.