Skip to content

Instantly share code, notes, and snippets.

@ferki
Last active April 26, 2016 13:20
Show Gist options
  • Select an option

  • Save ferki/eefe824f42c1254594a5 to your computer and use it in GitHub Desktop.

Select an option

Save ferki/eefe824f42c1254594a5 to your computer and use it in GitHub Desktop.
ssh tunneling
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' );
}
};
@fr34k8
Copy link
Copy Markdown

fr34k8 commented Apr 26, 2016

on windows, default shell bash could now apply for windows 10.
@krimdomu @ferki some switch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment