I'm trying to tunnel my production mongo server to my test server, so, I can perform some tests.
I know I can simply establish a tunnel by ssh -L, but I need to run this as a background process as I cannot have this running in my terminal.
ssh -f user@myip -L 27017:localhost:27017 -N
I also tried simply running it as a daemon process but it didn't work either.
ssh -L 27017:localhost:27017 myuser@myip
I know pointing to the production database from a different server is bad. But the thing is, I've migrated my assets to S3, and need to test if everything works properly before moving this to live. This is just going to take me half a day to test, so I don't want to go through the trouble of setting up another instance and dump a copy of my DB here.
Please help me with this.