Skip to content
Snippets Groups Projects
Unverified Commit aa78bc43 authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

fix issue #653: med-vnc now allows to connect when inside the Medicina LAN (#670)

parent 49e8f2bd
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ print_help() { ...@@ -5,7 +5,7 @@ print_help() {
echo "`basename $0` v1.0" echo "`basename $0` v1.0"
echo " " echo " "
echo "Start a new session toward DISCOS control software" echo "Start a new session toward DISCOS control software"
echo "Usage: '`basename $0` [OPTIONS] [-t|--port portnumber] <role>@<gatein>'" echo "Usage: '`basename $0` [OPTIONS] [-p|--port portnumber] <role>@<gatein>'"
echo " '`basename $0` -r|--roles'" echo " '`basename $0` -r|--roles'"
echo " '`basename $0` -h|--help'" echo " '`basename $0` -h|--help'"
echo "<role> indicates the role (observer or administrative privileges) for which the connection is done" echo "<role> indicates the role (observer or administrative privileges) for which the connection is done"
...@@ -114,9 +114,9 @@ for session in "${remote_sessions[@]}" ; do ...@@ -114,9 +114,9 @@ for session in "${remote_sessions[@]}" ; do
if [[ "$role" == "$role_name" ]]; then if [[ "$role" == "$role_name" ]]; then
if [ "$local_connection" = "TRUE" ]; then if [ "$local_connection" = "TRUE" ]; then
#this is for local area connection when it will enabled #this is for local area connection when it will enabled
#remote_port=$lport remote_port=$lport
remote_port=$rport #remote_port=$rport
ssh_port=5122 ssh_port=22
else else
remote_port=$rport remote_port=$rport
fi fi
...@@ -154,11 +154,11 @@ fi ...@@ -154,11 +154,11 @@ fi
if [[ "$local_connection" = "TRUE" ]]; then if [[ "$local_connection" = "TRUE" ]]; then
echo "Connecting from local area...." 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 else
echo "Connecting from wide area....." echo "Connecting from wide area....."
fi
ssh -N -f -p $ssh_port -L $local_port:192.167.189.98:$remote_port $role@$gatein ssh -N -f -p $ssh_port -L $local_port:192.167.189.98:$remote_port $role@$gatein
fi
if [[ "$vnc_avail" == "TRUE" ]]; then if [[ "$vnc_avail" == "TRUE" ]]; then
echo "Starting vncviewer...." echo "Starting vncviewer...."
vncviewer localhost:$local_port $viewonly &>/dev/null vncviewer localhost:$local_port $viewonly &>/dev/null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment