> Markdown version of https://tuna.am/en/docs/troubleshooting/errors/keepalive-timeout/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# SSH keepalive timed out

```text
WARN[12:00:00] SSH keepalive timed out after 15s
WARN[12:00:00] Connection lost, reconnecting: https://myapp.a.2na.am

```

A variant:

```text
ERRO[12:00:00] SSH keepalive failed: EOF

```

These lines appear in the tuna CLI and Tuna Desktop logs. The client doesn't exit; it [reconnects](https://tuna.am/en/docs/troubleshooting/errors/connection-lost-reconnecting.md). With `--log-level=debug`, the original error shows up as `Keepalive timeout`.

## Cause

Every 5 seconds, the client sends the node a connection check (keepalive) over the tunnel's SSH connection. If there's no reply for 15 seconds or the connection fails with an error, the client considers it dead, closes it, and connects again.

Usually the connection silently died somewhere along the way: the network changed, the laptop went to sleep, a VPN or NAT dropped a long-lived connection, or the link is congested.

## What to do

A single line after sleep or a network change is normal; the tunnel recovers on its own.

If the timeouts keep coming back:

1. Run `tuna diagnose` and check the latency to the nodes, see [self-diagnosis](https://tuna.am/en/docs/troubleshooting.md#self-diagnose).
2. Check whether a VPN or firewall cuts long-lived connections: exclude `api.tuna.am` and the nodes from the VPN, and allow the addresses from the [list](https://tuna.am/en/docs/guides/corporate-network.md#firewall-addresses).
3. If the host has IPv6, try `TUNA_FORCE_IPV4=1` — see [Tunnel fails to connect because of IPv6](https://tuna.am/en/docs/troubleshooting/ipv6.md).
4. Update the client to the latest version by following the [instructions](https://tuna.am/en/docs/guides/update.md).
