Last active
April 26, 2016 13:20
-
-
Save ferki/eefe824f42c1254594a5 to your computer and use it in GitHub Desktop.
ssh tunneling
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
| use Rex -feature => qw(1.3); | |
| user 'my_user_on_target'; | |
| #Rex::Config->set_openssh_opt( | |
| # LocalForward => 'localhost:2222 final.target.host:22' ); | |
| task 'runs_on_target', 'localhost:20000', sub { | |
| say run 'hostname'; | |
| }; | |
| no_ssh before 'runs_on_target' => sub { | |
| LOCAL { | |
| system( 'ssh', '-f', '-N', '-L20000:final.target.host:22', 'user@jump.host' ); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
on windows, default shell bash could now apply for windows 10.
@krimdomu @ferki some switch?