From aa78bc43d91bc3ff85dcf1ae0457687dabdc23ee Mon Sep 17 00:00:00 2001 From: Andrea Orlati Date: Wed, 9 Feb 2022 16:19:53 +0100 Subject: [PATCH] fix issue #653: med-vnc now allows to connect when inside the Medicina LAN (#670) --- Medicina/Misc/MedScripts/src/med-vnc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Medicina/Misc/MedScripts/src/med-vnc b/Medicina/Misc/MedScripts/src/med-vnc index e06585f53..8f1bf2ca8 100644 --- a/Medicina/Misc/MedScripts/src/med-vnc +++ b/Medicina/Misc/MedScripts/src/med-vnc @@ -5,7 +5,7 @@ print_help() { echo "`basename $0` v1.0" echo " " echo "Start a new session toward DISCOS control software" - echo "Usage: '`basename $0` [OPTIONS] [-t|--port portnumber] @'" + echo "Usage: '`basename $0` [OPTIONS] [-p|--port portnumber] @'" echo " '`basename $0` -r|--roles'" echo " '`basename $0` -h|--help'" echo " indicates the role (observer or administrative privileges) for which the connection is done" @@ -114,9 +114,9 @@ for session in "${remote_sessions[@]}" ; do if [[ "$role" == "$role_name" ]]; then if [ "$local_connection" = "TRUE" ]; then #this is for local area connection when it will enabled - #remote_port=$lport - remote_port=$rport - ssh_port=5122 + remote_port=$lport + #remote_port=$rport + ssh_port=22 else remote_port=$rport fi @@ -154,11 +154,11 @@ fi if [[ "$local_connection" = "TRUE" ]]; then echo "Connecting from local area...." - #ssh -N -f -L $local_port:192.168.1.99:$remote_port $role@192.167.189.98 + ssh -N -f -L $local_port:192.168.1.99:$remote_port $role@192.167.189.98 else echo "Connecting from wide area....." + ssh -N -f -p $ssh_port -L $local_port:192.167.189.98:$remote_port $role@$gatein fi -ssh -N -f -p $ssh_port -L $local_port:192.167.189.98:$remote_port $role@$gatein if [[ "$vnc_avail" == "TRUE" ]]; then echo "Starting vncviewer...." vncviewer localhost:$local_port $viewonly &>/dev/null -- GitLab