Skip to content

Instantly share code, notes, and snippets.

@pwang2
Created November 7, 2019 04:53
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 pwang2/229da9f3898d3b9b76c9231c423bed7e to your computer and use it in GitHub Desktop.
Save pwang2/229da9f3898d3b9b76c9231c423bed7e to your computer and use it in GitHub Desktop.
set -xe
PID="$(lsof -ti:5901 | paste -sd' ' | awk '{print $0}')"
if [ ! -z "$PID" ]; then
echo "$PID"
kill -9 $PID
fi
ssh -fN -p 2930 -L 5901:localhost:5901 pwang2@65.52.0.118
/usr/bin/xtigervncviewer -SecurityTypes None :1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment