• caglararli@hotmail.com
  • 05386281520

ssh port forwarding setup on server (jump host)

Çağlar Arlı      -    7 Views

ssh port forwarding setup on server (jump host)

I need to set up an ssh port forwarder on a server (jump host) in a manner that the ssh client does not know the target destination.

client machine --> jumphostserver --> targetserver:port

I can set up an ssh tunnel locally on client machine which has credentials to jumphostserver. Then the client machine needs to know the details targetserver:port to be able to connect. The client machine must not know the targetserver.

I want to set up the port forwarder on the jumphostserver so that it forwards all traffic to `jumphostserver:port to targetserver:port.

So client tunnels to jumphostserver: ssh user@jumphostserver -f -N -L <port>:jumphostserver:<port>

and jumphostserver:port forwards all traffic on port to targetserver:port when any application/program on the client machine connects to localhost:port

How do I configure sshd for this on the jumphostserver?