Skip to content

Instantly share code, notes, and snippets.

@lzs
Created January 16, 2020 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lzs/0c38bf4ba6e3690359e8463cd2517f47 to your computer and use it in GitHub Desktop.
Save lzs/0c38bf4ba6e3690359e8463cd2517f47 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Replace IP below as needed
PROXYUSER=user
PROXYIP=123.123.123.123
if pgrep -f $PROXYIP > /dev/null 2>&1; then
exit
fi
if test -f nohup.out; then
rm nohup.out
fi
nohup \
ssh -R 8888:localhost:8888 -R 8889:localhost:8889 -R *:8022:localhost:22 \
$PROXYUSER@$PROXYIP ./sleep.sh &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment