rescueshell Start trial

SSH "Timeout, server not responding"

This line comes after the SSH connection was made, often well into a session. ssh had been sending periodic keepalive requests, enough of them went unanswered, and ssh then ended the session. The line says the probes got no reply. It does not say why the path went quiet.

This page describes standard OpenSSH behaviour. The commands are the usual ones, and wording differs between versions and platforms. We did not run them against a particular server or network for this page.

What the line looks like

Timeout, server server.example.com not responding.
Timeout, server not responding.

The first form, with the host name filled in, is the one current OpenSSH prints. Older versions print the second form without a host name. The host name in the example is only an example, and yours will differ. Both mean the same thing here.

ssh only does this when ServerAliveInterval is in use, either in the command, with -o, or in a config file. That option makes ssh send a request to the server at intervals and wait for a reply. When enough of those requests in a row get no reply, ssh gives up on the connection and prints this line. This line is not a sign that ssh found the connection closed. It is ssh deciding, from the silence, to end it.

Several different situations look the same from the client: your own network dropped, your machine slept, something in the path stopped passing traffic, or the host stopped answering. The line cannot tell them apart.

Which page is this?

Several messages sound alike, so check what else the log shows. This page is for a session that was already open and was ended by unanswered keepalive probes.

1. Confirm the line and where it appeared

Check that the text matches one of the two forms above, and not a connect-time timeout or an ordinary close line. Note when it appeared: after a long quiet period, right after your laptop woke, after a network change, or while something was running. To see the line in context, run the command again with -v and keep the whole output:

ssh -v user@server.example.com

The ssh -v output reader checks a pasted log for well-known messages, including this line, and links the matching guide. It runs in your browser and sends nothing.

2. See where the keepalive setting comes from

Look for ServerAliveInterval in the command, for example in a -o option, and in the config for that host. If you did not set it, a config file, a shell alias or a wrapper script may have.

ssh -G server.example.com | grep -i serveralive

ssh -G prints the settings ssh would use for that host, and the lines it shows come from the command line and the config files it reads. Do not read this page as advice to pick a value. A suitable number depends on the network and on what the connection is for, and we do not suggest one. For a persistent tunnel that a device holds open, the autossh guide shows how the options are used. For an ordinary session that goes quiet, the close guide names the option in its idle check.

3. Rule out your own network, and see whether the host answers

The probes can only get through if the path works in both directions, so start on your own side. These are the same generic checks the close guide walks through, and this page does not repeat them in full.

If you can reach the far machine some other way, its sshd log and uptime can show whether it restarted or lost its network. That is a generic possibility, not a diagnosis.

If the machine is a RescueShell device

A path that starts from the device can help when you rely on an inbound SSH port that later goes quiet from the internet side. The agent on the device keeps an outbound HTTPS connection to our relay, so a public SSH port or a forward is not part of the path to a shell, and nothing has to be open inbound. See SSH without port forwarding. That needs the agent installed and running first.

This line is about keepalive probes on an open SSH session that got no reply. The relay does not make a far sshd answer those probes. A session that went quiet because your own network dropped, or because the device has no network of its own, is not changed by the relay. If a shell does not open once the agent is installed, see the shell does not open.

Try it on one device

The first device is free to try with no card, for 30 days from when it connects, not from when you sign up. Start a trial.