Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 a following problem: I can't connect to a freshly deployed ubuntu-server 11.10 through SSH from a remote host. Error: Connection timeout.

Troubleshooting so far:

  1. Connect locally - Connecting through SSH on a local network works like a charm.
  2. Check the router - There are no rules that can impact ssh traffic.
  3. Check the distro - If I launch a Ubuntu-desktop liveCD on the same machine - everything works as it should.

So, the distro's default configuration seems to be the culprit.

Configuration details:
- OpenSSH has been installed through selecting a role during the installation. - Other than that everything is configured by default.

Verbose SSH output:
Here's the output, everything freezes after trying to estabilish a connection (Port 2102 is forwarded to port 22 on the server):

ssh -vvv -p 2102 myhost
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to myhost [hostip] port 2102.
debug1: connect to address hostip port 2102: Operation timed out
ssh: connect to host myhost port 2102: Operation timed out

Can anyone tell me what could be the problem?

share|improve this question
Well, the distro's "default configuration" is "no open ports by default", so openssh-server does not get installed automatically. But once you install it, there should be no problems connecting. Basically, I'm saying I don't know. (To me step 2 -- router configuration -- seems most likely, but in that case I can't explain why you can connect to a livecd running on the same machine. More details could be useful.) – Marius Gedminas Feb 19 '12 at 13:47
like @MariusGedminas says -"... More details could b useful." – maniat1k Feb 19 '12 at 14:39
I'm willing to provide them. What details do you require? – Temikus Feb 19 '12 at 15:22
Well, first, on the server, can you do `netstat -tnlvp|grep :22' and put the output in your question? That will tell us on what interface the ssh server is listening (ought to be, i.e. all of them). – Marius Gedminas Feb 19 '12 at 15:28
google "debug2: ssh_connect: needpriv 0" u will find the results – One Zero Feb 20 '12 at 8:22

I think my router screws up DNS retranslation.
Following options in the sshd_config fixed the issue, at least partially:

UseDNS no
GSSAPIAuthentication no
share|improve this answer
I'm surprised that you saw a timeout and not merely a delay of a few seconds, but switching these options off is indeed a good idea most of the time. – Gilles Feb 20 '12 at 9:56

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.