Commit 96f057af authored by nimrod's avatar nimrod
Browse files

No need to check for already forwarded ports.

parent 545c9b69
Loading
Loading
Loading
Loading
+0 −3
Changes for Documents/bin/forward: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -9,8 +9,5 @@ host="$1" || { usage >> /dev/stderr; exit 1; }
forward="$2" || { usage >> /dev/stderr; exit 1; }
alias ssh='ssh -fnNTS ~/.ssh/%C.sock'

if ! ssh -O check -L "$forward" "$host"
then
ssh -o ControlMaster=auto -o ControlPersist=0 -o ExitOnForwardFailure=no -o ControlPersist=0 "$host"
ssh -O forward -L "$forward" "$host"
fi