I don't seem to be able to increase the SSH connection timeout much beyond a minute:

$ date; ssh home-qnap -o ConnectTimeout=7200; date
Wed 14 Jan 2015 15:23:32 AEDT
ssh: connect to host home-qnap port 22: Operation timed out
Wed 14 Jan 2015 15:24:48 AEDT

The same thing happens if I put ConnectTimeout in ~/.ssh/config.

Is that a general feature of SSH, or is there some way around it? My laptop is OS X Mavericks.

The server is a QNAP TS-451, running whatever it runs. Since I can't connect to it, I can't be much more specific.

Repeating the test from an Ubuntu VM timed out after a similar time:

Wed 14 Jan 2015 15:38:19 AEDT
ssh: connect to host port 22: Operation timed out
Wed 14 Jan 2015 15:39:36 AEDT

FWIW, I'm trying to increase it as the server seems to be under enormous load, but someone suggested that "eventually" it should accept the SSH connection.

  • Looks like a kernel limit of 75 s. This article mentions it, although the solution it provides is for Linux. – angus Jan 14 '15 at 5:39
  • Interesting - so to increase it, you change sysctl net.ipv4.tcp_syn_retries. On my Ubuntu VM it was already at 6, which according to the article should have given a timeout of 45s, not 77s. Anyway, I'd accept that as an answer if you want to make it one. (My server eventually shutdown, so I don't have the personal need anymore.) – Steve Bennett Jan 14 '15 at 23:49
  • let's wait, maybe somebody comes with an answer later... – angus Jan 15 '15 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.