Created
March 11, 2013 20:30
-
-
Save Rio517/5137459 to your computer and use it in GitHub Desktop.
Generic local tunnel to web url
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
desc "Start Reverse SSH Tunnel" | |
task :start do | |
ssh_username = "rails" | |
ssh_host = "managedmachine.com" | |
ssh_port = 22 | |
tunnel_listener_port = 9999 | |
local_listner_port = 8000 | |
exec "ssh -p #{ssh_port} -nNT -g -R *:#{tunnel_listener_port}:0.0.0.0:#{local_listner_port} #{ssh_username}@#{ssh_host}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment