I am trying to forward my port 8085 which is a live camera stream port for a mini http server, to a remote server.
My command which I am using is as so:
ssh -R $rport:dc-bb7925e7:$camport -p 25 email@example.com
As this command is right now, it does forward the port and I can see the live stream on the remote server by going to localhost:8085, BUT the problem is that on the client, there is a TTY session open which prevents all further scripts from running.
So I tried using ssh in the background with:
ssh -Nf -R $rport:dc-bb7925e7:$camport -p 25 firstname.lastname@example.org
This does not work as it seems as if the connection is closed. The port forwarding is being used in a script where the script assesses an if/then/else condition and then executes to forward. Forwarding this port is not suposed to halt all other scripts. It should simply forward the port and then move on, while keeping it open.
What am I doing wrong or are there any other flags that can be used?