- Copy to a file like
connect.sh
in your home (~/
). - Update the local variables such as
LOCAL_HOST
,REMOTE_USER
,REMOTE_HOST
andPEM_FILE
. - Make it executable with
$ chmod +x ~/connect.sh
- To run:
- Without ports
$ ./connect.sh
- With ports
$ ./connect.sh 8080 8081 ...
(you can add several ports separated by spaces)