Skip to content

Instantly share code, notes, and snippets.

@guillaumegarcia13
Last active August 25, 2016 18:08
Show Gist options
  • Save guillaumegarcia13/d565a92a14803cbda61ebc1ef990df06 to your computer and use it in GitHub Desktop.
Save guillaumegarcia13/d565a92a14803cbda61ebc1ef990df06 to your computer and use it in GitHub Desktop.
SSH Tunnel with Port Forwarding
:: Use this Windows BATCH file to perform SSH Tunneling with Port Forwarding to your local PC
::
:: Explanations of the command line switches
:: -ssh Connects through SSH
:: -P Port to which you connect on the remote server
:: -pw Password to connect with
:: -L Forwards local portal to remote destination
:: -N (always at the end) Do NOT start a shell
:: Example
:: putty.exe -ssh root@remote.com -P 2222 -pw azerty -L 15432:remote.com:5432 -N
putty.exe -ssh <user>@<remote server> -P <remote port> -pw <password> -L <local port>:<remote server>:<remote port> -N
@Demonium
Copy link

C'est evident!! ☺

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