Windows Putty connect to OSX SSH Server with SSH key Could someone guide me to setting up OSX (10.10 Yosemite) so that I can ssh from Windows using putty to Mac, but using ssh key rather than password.

On the Mac I've enabled remote-login under sharing preferences, but unsure how to setup the private/public keys.

All articles that I find on the web guide how to connect to Linux from Mac, but I want the other way round and where the client is Windows.

PS - I'm a complete noob when it comes to Mac and have only been using it for 2 days now!
You will need to use a program called PuttyGen.exe on the Windows side to generate a public and private key.  

Using the "Generate" button, generate the keys using the above program.  You will then need to move the public key that is generated to your mac.  Save a copy of the private key to use later using the "Save private key" button.

On your windows machine copy the contents of your public key exactly and paste them in the authorized_keys file you will create below.  The easiest way I think is to open an ssh connection using Putty to your mac machine, the first time you will have to enter a username and password.  Then create the folders and file structure and use an editor to move the contents.  From the putty terminal window connected to your mac enter:

sudo mkdir ~/.ssh
sudo touch ~/.ssh/authorized_keys
sudo chmod 600 ~/.ssh/authorized_keys
sudo chown root:wheel ~/.ssh/authorized_keys


Then the editing part of the file you created:

vim ~/.ssh/authorized_keys


Press the i key to insert text.  Paste in your public key, and press the keys esc then, :wq to save it. 

Now you can re-open Putty and create a new session.  On the left hand tab expand SSH and select the Auth tab.  Towards the bottom you will need to browse and load in the Private key that you saved earlier. 



I got most of this from the help file in PuttyGen.exe the first time I did it.  When you open Puttygen.exe there is a Help tab up top.

PuttyGen.exe download