Transport — Paramiko documentation
docs.paramiko.org › en › stableset_keepalive (interval) ¶ Turn on/off keepalive packets (default is off). If this is set, after interval seconds without sending any data over the connection, a “keepalive” packet will be sent (and ignored by the remote host). This can be useful to keep connections alive over a NAT, for example.
Client — Paramiko documentation
docs.paramiko.org › en › stableParamiko registers garbage collection hooks that will try to automatically close connections for you, but this is not presently reliable. Failure to explicitly close your client after use may lead to end-of-process hangs! exec_command (command, bufsize=-1, timeout=None, get_pty=False, environment=None) ¶.