remote-support-mambasoft.sh.in: parametrize the ports to tunnelize

This commit is contained in:
Silvan Calarco 2015-01-16 13:54:37 +01:00
parent bd9b00a710
commit 91d1ae4a6d

View File

@ -1,3 +1,5 @@
#!/bin/bash #!/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 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