SSH tunnel command just logs you in

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.

Timeline

Newsletter

Don't have time to check my blog? Get a weekly email with all the new posts. This is my personal blog, so obviously it is 100% spam free.

Metadata

Tags: , ,

This entry was posted on Friday, April 26th, 2013 at 8:43 am and is filed under Tech. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.