I use ssh to create a tunnel for my local server as below:
ssh -D 1234:localhost:1001 user@my-remote-AWS-EC2-server
then I run my local app.py which will expose the port:
Running on local URL: http://localhost:1001
Everything run as expected and it works. I can access the localhost:1001 at my-remote-AWS-EC2-server as localhost:1234
However, if I turn off my local monitor for few minutes, the ssh connection went into sleep and not responding anymore, how can I keep it alive even I turn off my local monitor?
Thank you.