Posts Tagged ‘ssh tunnel’

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.

Error resolving hostname on SSH tunnels

Saturday, April 20th, 2013 | Tech

Lets say you are trying to create an SSH tunnel.

ssh -L 27017:somehost:27017 you@examplehost.net

You may get the following error message.

ssh: Error resolving hostname \342\200\223L: nodename nor servname provided, or not known

This is caused by using the wrong kind of minus symbol. If you have copied and pasted the command from somewhere, this is probably the case. This is easy to fix – simply paste the command into your terminal, then go through it, remove the existing minus symbol and put a new – in.