PuTTY SSH client for Mac OSX - download and tutorial
PuTTY for Mac is a port of the Windows version of PuTTY. However, there are many options for SSH clients for Mac, and this page discusses several of them.
Contents
Using the built-in SSH client in Mac OS X Running SSH from the terminal command line Running SSH with a graphical user interface How to use PuTTY SSH keys with the built-in OpenSSH Ported PuTTY for Mac Installation using HomeBrew Installation using MacPorts Alternatives to PuTTY on the MacUsing the built-in SSH client in Mac OS X
Mac OS X includes a command-line SSH client as part of the operating system. To use it, goto Finder, and selext Go -> Utilities from the top menu. Then look for Terminal. Terminal can be used to get a local terminal window, and also supports SSH connections to remote servers.
Running SSH from the terminal command line
Once you have the terminal window open, you have two alternatives. The first approach is to type ssh hostname
or ssh user@hostname
into the terminal window. This is more familiar for Linux and Unix users who are used to using a command line.
Running SSH with a graphical user interface
The second option is to select New Remote Connection... from the Shell menu of Terminal. This opens a graphical dialog asking for the host to connect to and the user name. This also allows saving connections. This is recommended for users who are not accustomed to using a command line.
How to use PuTTY SSH keys with the built-in OpenSSH
If you have a PuTTY .ppk
format private key and want to use it with the built-in OpenSSH on Mac on the command line or in scripts, you can use the following commands.
First, install PuTTY for Mac using brew install putty
or port install putty
(see below). This will also install the command-line version of puttygen, the PuTTY key generator tool.
Then, use the following command to convert the .ppk
format private key to a standard PEM format private key:
puttygen privatekey.ppk -O private-openssh -o privatekey.pem
Make sure permissions on the private key file are set properly. It should only be readable by the user that owns it.
chmod go-rw privatekey.pem
You can now use the key for logins from scripts and command line with:
ssh -i privatekey.pem user@hostname
Ported PuTTY for Mac
There is a port of PuTTY for Mac. It can be installed in several ways.
Installation using HomeBrew
If you already have the brew
command installed, the best way to install PuTTY is to use the following command:
brew install putty
Installation using MacPorts
PuTTY is readily available via MacPorts. To see how to install MacPorts and PuTTY, see here.
Once you have MacPorts installed, you just need to give this command:
sudo port install putty
and to add a shortcut on the Desktop,
cp /opt/local/bin/putty ~/Desktop/PuTTY
Alternatives to PuTTY on the Mac
A lot of people use Cyberduck on Mac. It is a solid, well-known SSH client that is quite popular.