Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #check-ssh-tunnel.sh
- COMMAND="/usr/bin/screen -dmS ssh-Ubuntu /usr/bin/ssh -R 2255:localhost:22 user@domain-Desktop-Ubuntu.com -g"
- COMMAND_SSH="/usr/bin/ssh -R 2255:localhost:22 domain-Desktop-Ubuntu.com -g"
- PID=$(/usr/bin/pgrep -f -x "$COMMAND_SSH")
- if [ "$PID" = "" ]
- then
- $COMMAND
- fi
- ssh -p 2255 pi@localhost
Add Comment
Please, Sign In to add comment