Installing and Using Putty on Mac (OS X)
Installing and using Putty on a Mac or OS X is extremely easy. The following steps have been tested on Mountain Lion (OS X 10.8.2) but should work on other versions as well. For references, I used this and this. Also, if you tried installing Putty before finding this guide and got errors such as:
Error: Gtk-WARNING **: cannot open display, or
Error: port selfupdate failed,
then please refer to points 10, 11, and 12 for solutions below.
1. Download Xcode
This can be found at the Apple Developer Connection site, on your Mac OS X installation CDs/DVD, or in the Mac App Store.
2. Install Command Line Tools for Xcode
Under Xcode:
Preferences -> Downloads -> Components -> Install 'Command Line Tools'
3. Accept the Xcode EULA
Either launch Xcode or run:
xcodebuild -license
4. Download and Install MacPorts
https://distfiles.macports.org/MacPorts/MacPorts-2.1.2-10.8-MountainLion.pkg
5. Update MacPorts
Note: Make sure Xcode is fully installed.
sudo port -v selfupdate
6. Install Putty
sudo port install putty
7. Download and Install X11 (XQuartz)
http://xquartz.macosforge.org/landing/
8. Run Putty
Type ‘putty’ into Terminal:
putty
This should open Putty in an X11 window.
9. Desktop Shortcut for Putty
cp /opt/local/bin/putty ~/Desktop/PuTTY
10. Note 1
Error: Gtk-WARNING **: cannot open display:
If you get the above warning, please make sure you are using XQuartz as your X11 Emulator. Then go ahead and either restart Mac or simply log out and log back in. That should resolve the issue.
11. Note 2
Error: port selfupdate failed: Error installing new MacPorts base: shell command failed
If you get the above warning, please make sure you gave followed step 2 above. That would be:
Preferences -> Downloads -> Components -> Install 'Command Line Tools'
12. Note 3
If your error involves Xcode 4.3 and installing Putty using
sudo port install putty
This error occurs because the command line tools are installed in a different folder. You can fix the problem by copying them to the normal path:
cp Applications/Xcode.app/Contents/Developer/usr/bin/* /usr/bin/
So these steps should allow you to install and use Putty on Mac and specifically, OS X 10.8. As always, if this was helpful to you, then please do not forget to leave a comment, or two.

