I’ve been trying to setup the following port forward configuration using 1 (or 2) lines, but with no success:
3 Machines involved; local machine[local], prod machine[prod], 3rd party machine[service]. Prod has (http) access to an API hosted on service and I (local) have ssh access to prod. So for development purposes I am trying to setup a tunnel to service via prod so I can issue a cURL command to some local port and have the request hit the service endpoint.
I’m pretty sure I’ve done this exact thing a few years ago with a single ssh command, but so far I’ve been unable to replicate it. Any advice appreciated.
ssh -Nnt -L<localport number>:service:<service port number> <username>@prod &should do it and stay open in the background, if I understand what you’re trying to do. This will send requests on
<localport number>to<service port number>onservicethroughprod.