0

Example of my failed attempt (In this case, I am SSHing through a reverse ssh session over port 30001):

ssh root@localhost -p 30001 $file

The contents of $file look like this:

-L 8010:192.168.10.1:80 -L 8011:192.168.10.2:80 -L 8012:192.168.10.3:80

When the bash script runs, it only establishes the forward for 8010. Not 8011 or 8012. However, if I run this from the terminal manually, everything works fine. So, for whatever reason, the second and third -L values don't seem to be sent to SSH.

DRPY7
  • 1
  • 1

1 Answers1

0

I think that the answer below may help you by setting up your ~/.ssh/config file where you can configure your multiple port forwarding through the same host.

https://stackoverflow.com/a/56897152/2543522

Best Regards

IngGaberick
  • 319
  • 1
  • 9