Keep SSH Sessions Alive Without Confusing Keepalives with Persistence

An SSH session that works while you’re typing but drops after sitting idle may be hitting a NAT or firewall timeout. A client-side keepalive is a sensible first test—but it won’t preserve your shell if the server closes it or your network connection disappears. For OpenSSH, try sending a keepalive request every 60 seconds and allowing three unanswered requests: ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=3 user@server.example.com If that helps, save the settings for the affected host…

Read at the source This is a short summary. The full article belongs to its author and is published on Dev.to.

Share:TelegramX

Related posts

Цвета, которые HABR ненавидит

Однажды, листая ленту, мне показалось, что раньше иллюстрации к статьям были какими-то менее жёлтыми, что ли. Спойлер: мне показалось. В этот момент я как раз…