I am trying to code a shell-script that uses a ssh-connection for doing "heartbeats". I want to terminate the client- and server-side of that connection after a certain timeout (after the connection drops).
What I found so far:
- TCPKeepAlive yes/no for ssh and sshd
- ClientAliveCountMax for sshd
- ClientAliveInterval for sshd
- ServerAliveCountMax for ssh
- ServerAliveInterval for ssh
To change "ClientAliveCountMax" I would have to modify the sshd_config on each target machine (this option is disabled by default).
So my question is - can I use "TCPKeepAlive" for my purposes, too (without changing anything else on the source/target machines)?
Target operating system is SLES11 SP2 - but I do not think that is relevant here.