SSH Keep Alive

Something that annoys me is when after a period of a couple of mins a firewall kills your ssh connection! Then you have a dead terminal that can take ages to timeout. So this is a solution, keeping it alive…

ssh -o TCPKeepAlive=yes

Dead easy. I also have an alias in my .bashrc file in my home directory.

alias shortname=’ssh -C -o TCPKeepAlive=yes’

So all have to do is type ‘shortname’ in the terminal and it would connect me to Much better. The big ‘C’ btw is for compression.

About phil

Complex Systems Scientist.
This entry was posted in Linux Tips. Bookmark the permalink.