Below I will outline how to automatically log into your Raspberry Pi from a Windows PC using Putty. This requires the setup of SSH keys, which is very easy to do.
1. Create SSH keys.
Download Puttygen from here and run it.
Once open, click on Generate and move your mouse around to generate your SSH keys.
2. Copy and past the public key, which is shown at the top of Puttygen into notepad, we will use this later.
3. Now click Save Private Key and save the key to your local drive
If you getting a warning about saving the key without a passprase, just click yes.
4. log into your Raspberry Pi and create the authorization file,
5. Copy in the text we placed into notepad earlier. If you already have a key in there, just paste the new one onto a new line. Then ALT-X to exit and save.
6. Open up Putty and add in the IP address for your Raspberry Pi and make sure that SSH is selected.
7. Within Putty, on the left hand side, expand connection and SSH and select Auth. In the path for Private Key for authentication select the the private key we saved earlier.
8. We now need to add the user name to log in with.
On the left hand side, select connection and then Data.
Enter pi as the username.
9. Go back to the main screen and save the session.
10. Now select Open to log into your Rasspberry Pi automatically. No need to enter username or password. The first time you log in you will be asked to accept the key.
Reblogged this on anthonyvenable110 and commented:
sweet
Thank´s for a great article! Unfortunately there’s an error that made me struggle for a few hours extra. The name of the key-file should be authorized_keys and not authorized_key as stated above. When I found that out it started working like a charm! 🙂
you are right… thanks! I have updated the blog.
Hi Mark,
just discovered this tut. I’m sure I’ll get it going, however my raspbian image doesn’t have the
.ssh folder at all?
Texy
I got it working anyway – I just needed to create the folder 😉
Cheers,
Texy
Thanks!! Worked like a charm, been wanting to do this for years!!
This used to work for me, but hasn’t worked for a year or so. Not sure what has changed, but I get this message – “Server refused our key”
Texy
HELLO !
me too i get the message “Server refused our key”
Thank you !