Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The host operating system is Windows 7, the guest operating system is ubuntu 10.04(openssh installed). I have internet access on Ubuntu but I also want to access it from the same computer throught SHH. What should I do?

share|improve this question

migrated from stackoverflow.com Jan 2 '11 at 9:55

This question came from our site for professional and enthusiast programmers.

    
migrate it to superuser !? –  Michel Kogan Jan 1 '11 at 12:07
    
you might get better answer if you could ask it on askubuntu.com –  Vikas Patidar Jan 1 '11 at 12:08

3 Answers 3

This guide should help you VirtualBox + Ubuntu + SSH + x11

share|improve this answer

You your virtual machine uses NAT networking you should forward SSH connection from your host to guest. You can do it by executing such command on host:

VBoxManage setextradata <guestname> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 22222
VBoxManage setextradata <guestname> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManage setextradata <guestname> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

It allows you to forward all connection to port 22222 on host machine to port 22 on guest machine.

Then you can execute SSH on your host:

ssh -p 22222 username@localhost

You have to connect to your localhost to port 22222 and these connection will be forwarded to the guest machine.

share|improve this answer

Not quite a programming question, but anyways, to connect to your Linux host via SSH from Windows, you can use PuTTY. Login to the virtual machine manually and run ifconfig command in the terminal to find out the IP address of the VM.

share|improve this answer
    
thanks for the answer, but unfortunately PuTTY just can't connect. On VirtualBox, the network adapter is attached to NAT if this is going to help somehow. –  mrtksn Jan 1 '11 at 12:14
    
why don't u use a bridge to connect? –  wliao Jan 1 '11 at 12:17

Your Answer

 
discard

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