agebrock / reverse-tunnel-ssh

Easy reverse tunnel
MIT License
42 stars 12 forks source link

Keepalive #6

Closed garrylachman closed 6 years ago

garrylachman commented 7 years ago

Keepalive is missing... very important feature

agebrock commented 7 years ago

Hi @garrylachman please describe your expectation of a keepalive feature.

Can you achive that expectation with the ssh shell client or are you thinking of something like autossh ?

scottcarter87 commented 6 years ago

Here is an example. This would cause a KeepAlive packet to be sent every 50 seconds. You can also specify this to be the default by placing a config file at ~/.ssh/config with the same properties in it.

ssh -o TCPKeepAlive=yes -o ServerAliveInterval=50 user@host.example.com

agebrock commented 6 years ago

Hey sorry haven't been around for a while...

Try the following ssh2 configuration within the config object.

keepaliveInterval - integer - How often (in milliseconds) to send SSH-level keepalive packets to the server (in a similar way as OpenSSH's ServerAliveInterval config option). Set to 0 to disable. Default: 0

keepaliveCountMax - integer - How many consecutive, unanswered SSH-level keepalive packets that can be sent to the server before disconnection (similar to OpenSSH's ServerAliveCountMax config option). Default: 3