Keep SSH session alive

To avoid having your SSH session timeout due to inactivity, you can tweak your server and client settings.

Server side

Edit the fie: /etc/ssh/sshd_config
Set the values:

ClientAliveInterval 120
ClientAliveCountMax 720

Client Side

Edit the file: ~/.ssh/config
Set the value:

ServerAliveInterval 120

That should do the trick!

Advertisements

One thought on “Keep SSH session alive

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s