From f7afac2cd5222b241f9fc4e33ba1c30c54f908f6 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 2 May 2019 08:11:04 +0300 Subject: [PATCH] No need to check for already forwarded ports. --- Documents/bin/forward | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Documents/bin/forward b/Documents/bin/forward index 9d15309..ea58afa 100755 --- a/Documents/bin/forward +++ b/Documents/bin/forward @@ -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 +ssh -o ControlMaster=auto -o ControlPersist=0 -o ExitOnForwardFailure=no -o ControlPersist=0 "$host" +ssh -O forward -L "$forward" "$host" -- GitLab