SSH tunnel command just logs you in
Friday, April 26th, 2013 | Tech
If you’re trying to create an SSH tunnel, you may find that running the command just logs you into the remote server.
ssh -L 27017:somehost:27017 user@examplehost.net
To solve this, you need to use the -N flag.
ssh -L 27017:somehost:27017 -N user@examplehost.net
This will then just set up the forwarding, and not run the command.
If you’re trying to create an SSH tunnel, you may find that running the command just logs you into the remote server.
ssh -L 27017:somehost:27017 user@examplehost.net
To solve this, you need to use the -N flag.
ssh -L 27017:somehost:27017 -N user@examplehost.net
This will then just set up the forwarding, and not run the command.