Guest User

Untitled

a guest
Jan 20th, 2018
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #check-ssh-tunnel.sh
  2. COMMAND="/usr/bin/screen -dmS ssh-Ubuntu /usr/bin/ssh -R 2255:localhost:22 user@domain-Desktop-Ubuntu.com -g"
  3. COMMAND_SSH="/usr/bin/ssh -R 2255:localhost:22 domain-Desktop-Ubuntu.com -g"
  4. PID=$(/usr/bin/pgrep -f -x "$COMMAND_SSH")
  5. if [ "$PID" = "" ]
  6. then
  7. $COMMAND
  8. fi
  9.  
  10. ssh -p 2255 pi@localhost
Add Comment
Please, Sign In to add comment