Fix SSH from disconnecting

I use ssh client a lot…Sometimes happens that it disconnects and to keep that session alive you can try this…

Global Configuration
open /etc/ssh/ssh_config file and add in the end :

ServerAliveInterval 60

Current user configuration
Do the same with  ~/.ssh/config file if you don’t have the file create it

Host *
ServerAliveInterval 60

Indent the second line with a space.

Per-host configuration
If you want to do this just for a single server then in ~/.ssh/config file type :

Host *hostname.com
ServerAliveInterval 60

Thanks, hope it helps !
content : HTG

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 )

Facebook photo

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

Connecting to %s