Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 639 Bytes

keep-ssh-connection-alive.md

File metadata and controls

35 lines (29 loc) · 639 Bytes
aliases category classification date date_modified draft id image links local_archive_links pinned print series tags title type
keep-ssh-connection-alive
cli
public
2020-07-01 14:26:41 -0700
2020-07-01 14:26:41 -0700
false
20200701212641
false
false
ssh
connection
linux
Keep SSH Connection Alive
tech-note

The option -o ServerAliveInterval=60 tells the SSH agent to keep sending "pings" to keep the connection alive.

Example below.

ssh -v -o ServerAliveInterval=60 myname@myhost.com

Alternatively you can add it the your ssh config file for all hosts:

Host *
    ServerAliveInterval 60