A way to specify a different host in an SSH tunnel from the host in use

I am trying to setup an SSH tunnel to access Beanstalk (to bypass an annoying proxy server).

I can get this to work, but with one caveat: I have to map my Beanstalk host URL (username.svn.beanstalkapp.com) in my hosts file to (and use the ip in place of the domain when setting up the tunnel).

The reason (I think) is that I am creating the tunnel using the local SSH instance (on Snow Leopard) and if I use localhost or when talking to Beanstalk, it rejects the authorisation credentials. I believe this is because Beanstalk use the hostname specified in a request to determine which account the username / password combination should be checked against. If localhost is used, I think this information is missing (in some manner which Beanstalk requires) from the requests.

At the moment I dig the IP for username.svn.beanstalkapp.com, map username.svn.beanstalkapp.com to in my hosts file, then for the tunnel I use the command:

ssh -L 8080:ip:443 -p 22 -l tom -N

I can tell Subversion that the repo. is located at:


This uses my tunnel and the username and password are accepted.

So, my question is if there is an option when setting up the SSH tunnel which would mean I wouldn't have to use my hosts file workaround?


I would add an entry to your hosts file that maps to the hostname you need and then use the hostname to connect to your tunnel.

Update The hosts file is IMO your best option.

Need Your Help

ListFeatureClasses() glitch with SDE

python gis arcgis arcpy

I'm running ListFeatureClasses() on every Feature Dataset in my SDE using arcpy - the line goes something like this:

Thread 1:signal SIGBART

ios xcode swift xcode7

I have just started my coding course on Udemy with Xcode. I have got the 7.2 beta I believe. When I was the doing the cat project I encountered this error.