Created
September 12, 2013 14:04
-
-
Save lyoshenka/6537948 to your computer and use it in GitHub Desktop.
Tunnel HTTP(s) over SSH
This file contains 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 | |
# -f = daemonize, -q = quiet, -N = no command, just tunnel, -L = what port to forward, -i = ssh key | |
# sudo is only necessary when tunneling privileged ports | |
sudo ssh -f -N -q -L 80:localhost:80 user@host -i ~/.ssh/id_rsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment