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 firstname.lastname@example.org
To solve this, you need to use the -N flag.
ssh -L 27017:somehost:27017 -N email@example.com
This will then just set up the forwarding, and not run the command.