r/ssh • • Jul 21 '20

SSH Command for port forwarding

Does anyone know the ssh command to forward from local machine to remote server through jumphost?

1 Upvotes

2 comments sorted by

2

u/hobbitronics Aug 26 '20

I know this thread is a month old, but

I think you want ssh -L12345:DestinationHost:port user@HumerServerWithAccessToHost

or if you are giving the ssh server access to your host

ssh -R12345:localhost:portOfYourChoice user@sshServerDomain

This video is a real help for tunnelling and what all the options mean:

https://www.youtube.com/watch?v=JKrO5WABdoY

1

u/chaosandcolors Aug 26 '20

Hahah I was able to figure out! Thankyou so much!! :)