robozman / ssh-port-forward Goto Github PK
View Code? Open in Web Editor NEWA "simple" bash script (created to learn a bit more bash scripting) that configures ssh port forwarding to access a remote host
License: MIT License
A "simple" bash script (created to learn a bit more bash scripting) that configures ssh port forwarding to access a remote host
License: MIT License
Bash script to setup SSH Port Forwarding Perfect for creating Bash/ZSH/*SH aliases around Usage: ssh-port-forward <forward_name> <local_port> <forwarded_host> <forwarded_port> <ssh_host> ssh-port-forward options -b <forward_name> Opens the specified forward in the default browser -h Prints this help message -k <forward_name> Closes the forward by the specified name -l Lists all currently forwarded ports ssh options -i <identity_file> Specify ssh keyfile to use for authentication -p <ssh_port> Specify a port that the ssh server is running on Browser options -s Specify whether to use SSL/TLS when opening in the browser -t Silent Mode: Does not open the link in the browser When run, creates a $FORWARD_NAME-ssh.run file in /var/run/user/$UID/ssh-port-forward/ which contains the PID of ssh, the local port, remote host, and remote port. If /var/run/user/$UID/ does not exist, script will exit 1 Features to add: - Saving of PID to allow easy exiting (with a --exit or --kill flag) [x] Added - Add configurable temp directory Thanks to: - https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php for showing me the syntax for functions (and making quips about their use of paraenthesis) - http://tldp.org/LDP/abs/html/complexfunct.html for bash function tips - http://tldp.org/LDP/abs/html/fto.html for testing file / folder / socket existence - http://tldp.org/* at this point for teaching me everything - https://gist.github.com/scy/6781836 for some intersting ssh backgrounding information that I did not make use of - first comment at $ABOVE for linking me to $BELOW - second comment at https://stackoverflow.com/questions/2241063/bash-script-to-setup-a-temporary-ssh-tunnel/15198031#15198031 for introducing me to ssh control sockets (which are super cool) - the colorado school of mines for breaking me so much that after finished finals all I wanted to do is create more work for myself - people on stack overflow for teaching me bash scripting (and everything else I know) - the maker of the statue of liberty for being french - the dinosaur on the Firefox "Unable to connect" page for being cute the *-thousand time I forgot how to script - madeon for creating music to accompany me
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.