The terminal program which comes preinstalled on OS X is way too simple for most of us, especially if you work with web servers. Many are fans of Putty which is widely used on other operating systems. I am a fan of Putty, despite its dull name. Unfortunately it’s not a point-and-click install on a Mac. (Unless you are one for adventure!) I needed to install it today for the first time in years since Terminal officially made me crazy, so I decided to help out anyone else who needs to do this. I am stripping out the geek speak that I had to trudge through so that you can get on with your serious business.
Step 1:
Out of the box, there are some things you cannot do on your Mac. I’m talking about fancy things that require certain permissions, compiling and building. To enter this realm of geekdom, you must have your Developer Tools (file name: XCode 3.0) installed. This supposedly comes bundled inside Leopard but is not installed by default. If you can’t find it (which I gave up on after a few minutes), join the Apple Developer Connection (for free) and download the copy. You should join that anyway because it sends tingles down your spine just to have access. Once downloaded, you’ll want to install just about everything because who knows - you might need it later. I installed XCodeTools as needed and also WebObjects. (Maybe I’ll be a Cocoa programmer one day?)
Step 2:
After you install those tools, your Mac is now the powerhouse that it should be. You have unleashed commands in its BSD backyard that could not have been used before. Now you’ll be able to install Darwin Ports. This is a lovely package that allows you to run thousands of open source applications from Terminal. Funny thing is, I am trying to get away from Terminal! So after you download Darwin Ports (which also seems to be the same thing as MacPorts?) and install it, then you’ll need to … actually open Terminal.
Step 3:
Even though you are probably the only user of your Mac, you don’t have root permissions! YET! You’ll need to fix this in order to have a smooth install of Darwin Ports and later, Putty. (And everything else!) In Terminal, type the following:
sudo passwd root
Then enter the password you want. It’s just like you would do on your own dedicated server to change the root password. I just made this password the same one I used for my computer. All set.
Step 4:
Open up the Darwin Ports package that you downloaded and install it. After it’s done, go back to Terminal and type the following (and we’re still using sudo because… it just happens to be working that way):
sudo port -d selfupdate
Step 5: It’s time to install Putty. Finally, the goods. Back to Terminal and type the following:
sudo port install putty
Magic ensues and then you can see Putty in the point-and-click way that you love. I put a shortcut to it on my desktop in the one area that somehow never gets covered by windows. Perfect!

[…] This is for SSH users who want to use the program Putty on their Mac, instead of Terminal. How to Install Putty on OS X Leopard - Kayla - Internet Connoisseur __________________ theWHIR.com/kf The new Surpass site is being delivered! Announcement […]
Posted by [All] Install Putty On OS X Leopard - Surpass Web Hosting Forums
April 27th, 2008, às 8:37 pm. #.
wow!… I remember I tried to install putty once on my mac and I could never figure out how to do it… I needed putty so bad for RSA keypairs & putty-gen. Like I really need it badly… So now the next time that I’m in front of a MAC (like now) … I’m going to come here and use your awesome tutorial. Thanks!
Posted by Brandon
April 27th, 2008, às 9:14 pm. #.
Next you should show us how to install Wine and some games on Mac ![]()
I’ve never used any of Putty’s other features. What makes it better than others?
What do you need to do that Putty does that Terminal.app cannot? Terminal.app is much more powerful than Putty, as it gives you full access to OpenSSH’s many (many) options.
Just wanted to make a tutorial if anyone needed it. ![]()
Hey Kayla, another nice site them - seems like it changes each time I find time to visit. ![]()
Why the heck would you want Putty on OS X? Load up terminal and use SSH. Well I’m a bit of a purist (read: lazy) and I just open up the terminal and use ssh …
I can really only think a couple of things that SSH on the cli doesn’t make very easy:
1. automatic logins via RSA keypairs
2. forwarding ports / creating those nice SSH tunnels.
Anyways, here’s how to do both of the above:
1. Automatic log ins - go download sshkeychain: http://www.sshkeychain.org/
It hasn’t been updated in a while, which is a good thing since it is simple and just works.
On the plus side it can also build a tunnel for you, just click on it in the menu bar and choose the tunnel you want enabled. Works great, no need to load up terminal and manually build an SSH tunnel.
2. SSH Tunnel:
man ssh
really here’s a quick reference:
ssh username@host.com -L 8080:remotehost:8090
That will make localhost:8080 tunnel to remotehost:8090. Really easy.
3. Supplementary
After you have sshkeychain running you should be able to ssh to hosts with just: ssh username@domain.com and it’ll just log in. The pain of course is distributing all those keypairs. To do that I just wrote a simple shell script:
benzo-macbookpro:~ $ cat prop_ssh_keys.sh
#!/bin/sh
if [ ! $# -eq 1 ]
then
echo "Usage: $0 username@host"
exit
fi
ssh -v $1 -C "mkdir .ssh; echo "`cat ~/.ssh/*.pub`" >> ~/.ssh/authorized_keys; chmod 700 .ssh; chmod 640 .ssh/*"
It’ll propagate your public keys over and you’ll never again need to type in your password. Don’t forget it though cause there is still sudo
Ben.
Ben, thanks for offering these tips. Maybe I can wean myself out of Putty! I have just been using it for years and it’s hard for me to break out of habits. For me, using Terminal has involved learning more commands which I haven’t had time to jump into. And so it goes. But with the help from you guys, this is all making a lot more sense!
If you’re good enough to install putty from darwinports you shouldn’t have any problems learning the shell. I used to be Windows user, switched to the Mac for a GUI with the ability to drop to a CLI fast.
I use LaunchBar so getting to the terminal (or any app) is fast. Some people like QuickSilver, which works well too (and is free).
Dear Kayla, thanks for the tips. However, I have (apparently succesfully) installed Puffy on my MAC, and can find some Puffy files. But I can’t find the file that runs the program. Can anyone help me?
Yours sincerely
Posted by Jakob Danneskiold-Samsøe
May 13th, 2008, às 2:29 am. #.
Of course, I mean Putty, getting the name right does’nt help much
sincerely
Jakob
Posted by Jakob Danneskiold-Samsøe
May 13th, 2008, às 8:35 am. #.
you should get used to terminal on osx, since its a generic /bin/bash shell unlike putty which is just a simple ssh client. and if your on windows you should get used to cgywin, which is a /bin/bash emulator shell for windows, much more feature rich than putty.
Hi Kayla
>Just wanted to make a tutorial if anyone needed it.
You did it. Thank You and Regards.
Posted by Dmitry Kaidalov
June 5th, 2008, às 5:06 pm. #.
Hey - this is great, used it to install putty so I could access an international proxy service, many thanks!
Posted by Rob
June 8th, 2008, às 6:15 pm. #.
I am very glad that some are benefiting from this article! Thank you for letting me know.
Actually, you shouldn’t need to set a password for root for doing MacPorts. just skip that step and it will ask you for your user password. Not sure why you would NEED to enable root. Most don’t understand what they’re doing in that area and are just adding an unnecessary security risk.
@Ben Wong - you don’t need sshkeychain with 10.5 and up. sshagent starts up automatically for you and you can even keep your dsa keyphrases in your keychain. See http://www.dribin.org/dave/blog/archives/2007/11/28/ssh_agent_leopard/ for more.
Posted by Ryan Mullins
June 16th, 2008, às 5:57 pm. #.
> sudo port -d selfupdate
“sudo: port: command not found”
Mike, did you install the XCode tools and Darwin Ports? One of those is not working correctly.
The solution to above problem was locate the needed ~/.profile file using google and place it in my home directory.
Good grief. What is going on here? Putty is a wonderful thing. It means morons like me can connect securely to vast numbers of remote systems by picking the name out of a list without having to dink around with bizarre commands like those incanted by Ben above.
I am doing The Switch, and lemme tell you, folks with low brows need as much carryover as possible.
So Kayla, ya done good. You ignore all those people telling you that you have wasted your time, because you just saved a heap of mine.
Now stop reading this nonsense and go figure out how to get Snagit running under OS X. Since Port solved the Putty problem, perhaps, Wine will be the fix for Snagit.
By the way, I have a farm at a place called Putty, which is about 2 hours from the Sydney Harbour Bridge and 1 hour from the nearest shop. If you think Putty is a strange name for a piece of software, it looks even funnier on you mail.
Thanks again, and Adam, Ben Michael (above) - stop trying to talk the man out of doing valuable social service.
Russ.
Posted by Russ
June 21st, 2008, às 4:43 am. #.
And another thing - XCode Tools is on Install Disk 2. Those of us who are more amply endowed don’t need the ego-polishing that comes from belonging to the Developer Conniption.
Posted by Russ
June 21st, 2008, às 4:57 am. #.
Gees, I feel like a right twonk. I just Googled “Kayla Gender” and it seems that Kayla’s might not be A Man as my first, misguided posting stated. I’m guessing this is one of those many times when the right man for the job is a woman. It continues to amaze me that dinosaurs like me come out with assumptions like that, particularly as I live with a woman with a mind like a steel trap (and a right hook that can’t be ignored either.) Thank Ford she is of a forgiving disposition.
Should I wear a frock and heels for a day as penance?
Russ. (And thanks again, Kayla, for the Putty Recipe.)
Posted by Russ
June 21st, 2008, às 5:14 am. #.
Two more things I never wanted to know about macports:
Thing 1 - be patient
===============
The installer seems to hang. There is no obvious activity. The “top” command shows nothing interesting. Zip. Nix. Nada. Just as I was reaching for my revolver, it finished. It took almost 10 minutes to run on my (partners) new iMac. Make yourself a martini, then watch Operah (I believe that is what Americans do to no-op…) It will finish when you least expect it.
“Sometimes he sits and thinks, and sometimes … he just sits…” possibly Milligan?
Thing 2 - the port -d selfupdate will probably not work
=========================================
I had the problem reported by Mike above - the port -d selfupdate doesn’t work. The solution is that you need to add some stuff to your PATH variable in ~/.profile.
Specifically, this:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
They say you also need to set the DISPLAY variable for X, but they are fibbing. I just needed the path.
A complete spiel on installing macports is here:
http://trac.macports.org/wiki/InstallingMacPorts
but you just need the path. Really.
Posted by Russ
June 21st, 2008, às 6:53 am. #.
Russ, I really have to say your comments were the most entertaining ones I’ve ever had on my blog. Do you write? If not, I’d buy your book when it’s out next year. Thanks.
I saw your comment last night about me being a man, and instead of replying I went to sleep a little disturbed. But I woke up and you figured it out.
About that ~/.profile issue - I did not have to do that step and I’m a bit confused on what that’s about.
Kayla, we aim to please. I possibly could be a writer, but I prefer to eat. Therefore I am that most boring of animals, an IT consultant. But I _am_ switching to Mac, so personality and creativity will naturally follow, non?
It is possible that your .profile already contained the necessary path adjustment for other stuff that you have already ported.
Posted by Russ
June 21st, 2008, às 7:38 pm. #.
I must be lucky then when it comes to these things.
Switching to Mac definitely will bring out The Real You. It happened to me.
Took the new PuTTY-4-Mac for a drive today in a real life scenario and realized that I have no idea how to cut and paste. Tried swipe and right-click - no joy. The X11 Edit menu has cut but never paste. And I was faced with a filename that looked like a dropped bowl of alphabet soup.
It must be possible, right? I mean, it is cut and paste. Apple practically invented it. I am old enough to remember life without it and I don’t want to.
Any ideas.
Posted by Russ
June 24th, 2008, às 1:12 am. #.
For me, pasting anything results in pasting nothing. It’s actually a rare occasion when I need to paste, so I have managed to live without it.
Though I feel your pain. I will research.
Woohoo! I’m sure I tried this before, but wayhey, it worked this time!
Putty is wonderful. It’s so much faster than Terminal.app, supports 256 color mode, has sensible and adjustable (the Character classes bit on the selection pane) copy/paste. The copy/paste was the final straw that made me give up on Terminal.app.
drag or double/triple click to select, middle click to paste - not quite as nice as the windows right-click to paste but hey. You can change the X11 prefs to ‘emulate three button mouse’ and then use option-click rather than middle click, too.
Putty picked up the ssh key from my keychain automagically, which was nice
Kudos to the ports team, and thanks again Kayla for this post ![]()
Posted by sarabob
June 24th, 2008, às 8:46 am. #.
Sarabob, you are our copy and paste hero! <3 Thank you for posting.
(And now that you mention it, Putty does seem faster!)
Well done!
So now I can copy and paste within Putty. But I cannot paste into/from another document, such as Pages. It works from an Xterm, but not from Putty, so clearly Putty is using its own copy buffer.
Has anyone managed to copy between Putty and a native Mac app?
Please note that I am not being dumb or lazy here - I have exactly 1 week of OS X experience. I have not met anyone in my line of work who uses a Mac. There is a lot of stuff to crank up to make it work and I have bet $8000 that it is possible (My new Macbook 17″ is apparently on a loading dock in Shanghai… How exotic.)
Posted by Russ
June 26th, 2008, às 7:33 pm. #.
Kayla Fleming © 2007.
Simple Grey theme developed by Rodrigo P. Ghedin.