When using control masters also enable keep alives

Prevents the master connection from becoming stale. Use ssh protocol
keep alives rather than tcp ones as tcp ones are often blocked by
firewalls and also spoofable.
This commit is contained in:
Kovid Goyal 2022-03-10 11:48:36 +05:30
parent 3282c8200d
commit 384c56f834
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -447,6 +447,9 @@ def connection_sharing_args(opts: SSHOptions, kitty_pid: int) -> List[str]:
'-o', 'ControlMaster=auto', '-o', 'ControlMaster=auto',
'-o', f'ControlPath={cp}', '-o', f'ControlPath={cp}',
'-o', 'ControlPersist=yes', '-o', 'ControlPersist=yes',
'-o', 'ServerAliveInterval=60',
'-o', 'ServerAliveCountMax=5',
'-o', 'TCPKeepAlive=no',
] ]
return ans return ans