Corkscrew on Mac

This is a tutorial on how-to install corkscrew on Mac. With corkscrew you can establish a ssh tunnel through a proxyserver.


Please note that you need the gcc compiler for MacOSX which is included in XCode. You can download it for free from Apple but you need to setup something they call a developer account.


You could download corkscrew through Darwin Ports but I like compiling from source better. That way you always have the latest version of an application. First get the sources from the official homepage. Then unzip the corkscrew tarball, change to its directory and try to compile corkscrew. On Mac we do this with /.configure, however you might run into your first error.

configure: error: can not guess host type; you must specify one

Error prevention

In order to avoid above error message during configuration you can use the autoconf tool.

autoconf will determine useful data for the configure script on unknown or latest systems. It is part of the GNU build system. Wikipedia (2009) states the latter is also known as autotools and is used for making sources portable to Unix-like systems like a Mac.

Build against your machine

After running the configure script you most likely will run into your next error:

configure: error: cannot guess build type; you must specify one

In this case we must define our CPU platform in the configure script. If you are using an Intel-based Macintosh you should configure the build script with:

./configure --build=i686-apple

Now finish the installation of corkscrew for Mac with

make && sudo make install

Using corkscrew

Now you can use corkscrew together with ssh. Simply create this file `~/.ssh/config' with the following two lines:

Host *
ProxyCommand corkscrew 8080 %h %p

%h and %p are variables which are used by ssh to fill in the actual host and port you want to connect to. Just use the usual ssh syntax and ssh will connect you via the corkscrew proxy.

ssh user@hostname

That's it. Congrats you are now able to build a ssh tunnel through HTTP proxies with corkscrew. I hope you enjoyed this review and maybe do a backlink to my blog. Thanks for reading!


Tunneling SSH over an HTTP-Proxy Server, Wikipedia. "GNU Build System." Wikipedia, the Free Encyclopedia. 24 Oct. 2010. [online], accessed on 26 Oct. 2010.