#!/bin/bash

local_port=22

ssh_server=ictfax.org
ssh_user=ictsupport_server
ssh_port=8022

message_template="\
**************************************\n\
          !! Connected !!\n\
Your connection id is: client_\\1\n\
**************************************\n\
Please note the above id and contact ICT Innovations Support at support@ictinnovations.com !\n\
Please don't close this application during active support session\n\
\n\
You can close this application by pressing ctrl+c\n\
"

echo "Please wait! connecting ..."
exec 3>&1
eval ssh -N -T $ssh_server -l $ssh_user -R $ssh_server:0:localhost:$local_port -p $ssh_port 2>&1 1>&3 \
    | sed "s|^Allocated port \([[:digit:]]\+\) .*$|$message_template|"
