Commit cbaeadb4 authored by Russell D's avatar Russell D

commit socket_setup.sh V.15

parent ed3ff86c
......@@ -35,12 +35,12 @@ then
else
#establish a new ssh session to the bastion host
screen -dm ssh -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R 9001:localhost:22 -p 53 jumpman@a2cybersecurity.com
screen -dm ssh -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R 9001:localhost:22 alice@mysshbastion.com
nnpids=$( ps faux | grep -i a2cyber | grep -v grep | awk '{ print $2 }' | wc -w )
if [ "$nnpids" -eq 2 ]
then
echo -en "We established a new ssh session to a2 through port 7001. `date`"
echo -en "We established a remote socket on the bastion. `date`"
else
echo -en "Something went wrong, there is "$nnpids" ssh connections running to the bastion.. `date`"
echo -en "Something went wrong, there are "$nnpids" ssh connections running to the bastion.. `date`"
fi
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment