Error resolving hostname on SSH tunnels

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.

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 Saturday, April 20th, 2013 at 8:31 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.