Use a PuTTY generated key on Mac OSX

I wanted to use the key I generated using the PuTTYGen tool on my windows laptop, on my now repaired Mac Pro. The standard PuTTY generated key will not work on Linux or Mac OSX, so the key needs to be converted into a standard that will, like OpenSSH. You can convert your key by using the ‘Export to OpenSSH’ option explained in a previous post.

Once you have your new private OpenSSH key, copy it to your Mac.

Open terminal, and go to your root… usually does this automatically, but type cd ~/ just in case.

Create a .ssh directory if it does not already exist and copy the private key in here.

You may need to check that the key has the right permissions, type chmod -R g0-rx ~/.ssh

Enter your ssh command, ssh username@serverhostname.com and hit enter, you should get now have a SSH tunnel to your server.

HANDY TIP: use the vvv flag to debug the ssh command  (looks odd but thats 3 v’s by the way!).

So type ssh username@serverhostname.com -vvv to receive a load of debug info that can be really useful in determining where you are screwing up.

Also I found this guide useful.

One thought on “Use a PuTTY generated key on Mac OSX

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s