From 91d1ae4a6d0800de6f4464b1ff64296fa31f9ab3 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 16 Jan 2015 13:54:37 +0100 Subject: [PATCH] remote-support-mambasoft.sh.in: parametrize the ports to tunnelize --- remote-support-mambasoft/remote-support-mambasoft.sh.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/remote-support-mambasoft/remote-support-mambasoft.sh.in b/remote-support-mambasoft/remote-support-mambasoft.sh.in index e2ba9e3..b14c742 100755 --- a/remote-support-mambasoft/remote-support-mambasoft.sh.in +++ b/remote-support-mambasoft/remote-support-mambasoft.sh.in @@ -1,3 +1,5 @@ #!/bin/bash +[ "$1" ] && LOCAL_PORT=$1 || LOCAL_PORT=22 +[ "$2" ] && REMOTE_PORT=$2 || REMOTE_PORT=$(($LOCAL_PORT + 45000)) export SSH_ASKPASS=@libexecdir@/openssh/ssh-askpass -ssh -p 4424 -N -R 45678:localhost:22 assistenza@services.mambasoft.it +ssh -p 4424 -N -R $REMOTE_PORT:localhost:$LOCAL_PORT assistenza@services.mambasoft.it