Created
June 9, 2018 17:06
-
-
Save sblack4/72e50980cbf9c36ca0a2bece728b0202 to your computer and use it in GitHub Desktop.
ssh command for vnc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "... sshing to vncserver once we get some info ..." | |
| echo "enter ip e.g. 123.456.789" | |
| read HOST_IP | |
| echo "enter username e.g. ubuntu" | |
| read USERNAME | |
| echo "key file, e.g. myPrivateKey" | |
| read keyfile | |
| echo "enter port" | |
| read PORT | |
| ssh $USERNAME@$HOST_IP -i $keyfile -L $PORT:$HOST_IP:$PORT -N -f -l $USERNAME | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment