Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have followed a tutorial from this website I am up to the point in the tutorial where it says to login via SSH. I have installed Putty and logging in under debian-vm as the host name and I have also used as a IP address. I get a connection timed out error every time I try to login.

I have read other posts and suggestions pop up that it may be due to firewall issues or network related issues. Ultimately I am not well versed in networking so I really wouldn't know. Can someone suggest where to start to fix this issue or help me with any ideas they may have. I am using Oracle Virtual box with Debian 64 bit on Windows 7. I have OpenSSH installed on Debian, using NAT for adaptor 1 and Host only adaptor on 2. I have written to the files in Debian and I have written the IP address and host name into the hosts file on Windows 7 as instructed.

share|improve this question
Use Bridged networking. Not NAT/Host only. Bridged is the better choice 95% of the time. – Zoredache May 14 '13 at 18:49
@Zoredache Tried bridged networking on both adaptor 1 and 2 with no luck. – Matthew Underwood May 14 '13 at 20:50

In VirtualBox, under the port forwarding section, leave everything blank, just enter 22 in the two port fields.

This worked for me after twi hours of messing with other stuff, and reverting. I was able to get pings going, etc, but eventually read the last answer, and just tried entering 22 in the two fields. Works.

share|improve this answer

Can you ping the VM? Check the firewall on Windows. Also, do you have ssh started and running on debian?

Run this on debian in a terminal to find out if ssh is listening.

netstat -tln | grep 22

share|improve this answer
protocal revq sendq local address foreign address state tcp 0 0* LISTEN tcp6 0 0 :::22 :::* LISTEN this is what I got from netstat command – Matthew Underwood May 14 '13 at 18:22
@MatthewUnderwood, install telnet on your Windows box and try telnet 22 -- if you will also get timeout error then the port is either firewalled or some other configuration problem prevents packets from reaching that port or leaving the Debian host. – kostix May 14 '13 at 19:14
@kostix Tried that, could not open connection to the host, on port 22 – Matthew Underwood May 14 '13 at 20:42
@MatthewUnderwood, now what with Jason's suggestion -- can you ping the Debian host? – kostix May 15 '13 at 6:16
Ping from your windows box to the debian or vice versa. I think you may have the Windows 7 firewall running. What I suspect you'll see is that you can't ping the machine. Your Windows firewall may be on and stopping any traffic from reaching the VM. By the way, your SSH is actually listening. What you posted it shows that port 22 (SSHD) is actually running and waiting for connections. – Jason H May 15 '13 at 11:18

Okay here's what you need to do:

Step one: Get your VM up and running. Make sure you have only one network adapter setup for your VM. It's find if you set it up for NAT. An out of the box Debian install will most likely be setup for dhcp. So it should grab an IP from Virtual Box.

Step two: Verify that you have an IP in debian. Open a term and type


Make sure there is an IP there.

Step three: Start SSH by typing:

service ssh start

Verify that it is running by typing:

netstat -tln | grep 22

This should show you what you posted up before something like listening

Then try and ping the windows IP address from the debian box and vice versa.

If you can't ping the Windows box turn off the Windows Firewall and try it again.

Post your results, but that should do it.

share|improve this answer
I done all the instructions you gave me. disabled adaptor 2, started ssh on debian, got back tcp LISTEN. I pinged IPV4 address on my windows machine from debian and that worked. The eth0 from the ifconfig has a inet addr of I managed to ping to the windows machine without disabling the firewall. – Matthew Underwood May 15 '13 at 19:17
Cool, have you tried to ssh to your debian box? If so what did you do and results did you get? – Jason H May 16 '13 at 0:54
I am just reading a article about SSH, noticed my ipconfig dosent contain a Ethernet adapter VirtualBox Host-Only Network:, it just has two tunnel adaptors. – Matthew Underwood May 16 '13 at 17:09

I'm having the exact same issue with that same tutorial, I made a question about it here:

Debian VM will not longer bring up the host-only interface

Since I only have 1 reputation, I can't comment any answers so I can't contribute to an answer.

So I'm just posting it here.

The answer to Jason H's question is that dhclient eth(#) produces this error:

RTNETLINK answers: File exists

Meaning the gateway route is already listed in the ip table.

And I don't understand why I get that error, since I never actually set a gateway to begin with.

share|improve this answer

On the Network screen, see if you can tell VirtualBox to forward port 22 to your VM.

share|improve this answer
Virtual Box dosent allow me to port forward the Host only network adaptor. – Matthew Underwood May 22 '13 at 19:37
How about for the NAT adaptor? Can you try connection on that IP? – Louis May 22 '13 at 19:48

Your Answer


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.