Commit a4093ccd authored by Russell D's avatar Russell D

added socket_setup.sh V.12

parent 38b5571f
#!/bin/bash
# socketsetup - remote access behind NAT
# version .12
#
#
pids=$( ps faux | grep -i a2cyber | grep -v grep | awk '{ print $2 }' )
npids=$( echo "$pids" | wc -w )
echo $npids
echo $pids
if [ "$npids" -ne 0 ]
then
if [ "$npids" -ge "3" ]
then
kill -9 ` ps faux | grep -i a2cyber | grep -v grep | awk '{ print $2 }' `
fi
if [ "$npids" -eq "2" ]
then
exit 0
fi
else
screen -dm ssh -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R 7001:localhost:22 -p 53 jumpman@a2cybersecurity.com
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