Skip to content

Instantly share code, notes, and snippets.

@nascimento
Forked from samukasmk/tuneis_ssh.sh
Created October 22, 2015 19:27
Show Gist options
  • Save nascimento/d448a3bf6bc051bf5205 to your computer and use it in GitHub Desktop.
Save nascimento/d448a3bf6bc051bf5205 to your computer and use it in GitHub Desktop.
Exemplos de Tuneis SSH
### TUNEL DE ACESSO A UMA PORTA REMOTA, COMO SE FOSSE LOCAL
ssh -f <USUARIO>@<IP DA MAQUINA SSH> -L <PORTA LOCAL>:localhost:<PORTA REMOTA> -N
# Ex: TUDO QUE FOR PARA MINHA PORTA LOCAL 18080, SERA DIRECIONADO A PORTA REMOTA DO SERVIDOR 8080
ssh -f samukasmk@meu_servidor.com.br -L 18080:localhost:8080 -N
### TUNEL COM NEXT HUP
ssh samukasmk@<IP SERVER PULO> -t -t -L <IP LOCAL>:<PORTA LOCAL>:localhost:<PORTA LOCAL> ssh -D <PORTA DESTINO> <USER>@<IP SERVER DESTINO>
# Ex: porta 8080 com next hup
ssh samukasmk@meu_servidor_pulo.com.br -t -t -L 0.0.0.0:18080:localhost:18080 ssh -D 8080 smk@meu_servidor_destino.com.br
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment