Expand description
Port forwarding control via ControlMaster sessions.
Structs§
- Control
Session - A discovered
ControlMastersession. - Port
Forward - A single active port forward on a
ControlMastersession.
Enums§
- Forward
Type - Whether a forward is local (-L), remote (-R), or dynamic/SOCKS (-D).
Functions§
- cancel_
forward - Cancel the forward on
local_port(lists first to find its spec); an inherent TOCTOU race means it may vanish before the cancel lands. - cancel_
known_ forward - Cancel a known forward directly, skipping the list round-trip; the spec
is
[addr]:lport[:rhost:rport], with an empty rhost sent aslocalhost. - exit_
session - Close a
ControlMastersession (ssh -O exit); the socket file is unlinked asynchronously, so re-check the path before assuming removal. - list_
forwards - List active port forwards on a
ControlMastersession. - list_
forwards_ bounded - Run
list_forwardsfor many control paths with boundedssh -O listspawns; results in input order, one failure never cancels the others. - list_
sessions - Discover live
ControlMastersessions by scanningssh_dirprefixes (cm-,control-,mux-,ctrl-) and/tmp/ssh-*viassh -O check.