Raspberry Pi Adventures

Join me on my fun ride

SSH Login To Rasspberry Pi using Secure Keys and Passphrase

Leave a comment

There are 2 approaches

1. You can generate the Public and Private Keys for SSH on the Rasspberry Pi itself and copy the private key to your machine and use that private key with Putty

Related Guides to Generate Keys on the Raspberry Pi
Generating SSH Keys · github:help
How to Use RSA Key for SSH Authentication – Softpedia
setup – How can I protect against intrusion and malware before connecting it to the internet (especially on a public IP address)? – Raspberry Pi Beta – Stack Exchange

Note : These are generic guides but work on the RPi.

2. You can generate the Public and Private Keys using PuttyGen and copy the Public key to Raspberry Pi

This is a fantastic guide with loads of pics
Key-Based SSH Logins With PuTTY | HowtoForge – Linux Howtos and Tutorials

2.1 Private Key stays on your PC and will be used with Putty.
2.2 Public Key needs to be copied to “/home/pi/.ssh” and will be saved in “authorized_keys” file.
Note: The /.ssh folder might not be present in the user “pi” folder so you need to create it.

The contents of the “authorized_keys” file should look like this
ssh-rsa AAAAB3NzaC1yc2EA[...]Lg5whU0zMuYE5IZu8ZudnP6ds= myname@example.com

Note: This is a very important step to format the content in “authorized_keys” file if you generated the Keys using Putty.

3. To change Passphrase Later
Working with SSH key passphrases · github:help

General Reads
Using Public Keys for Authentication :: WinSCP
SSH Keys – ArchWiki
Github:help : SSH

Logging into a Rasberry Pi using Public/Private Keys « Steve @ DynamicEdge
Raspberry Pi • View topic – Logging in via Putty and Secure Keys
Using PuTTY’s Key Generator To Manage Keys
Using PuTTYGen to generate SSH private/public keys | katsande.com

Author: Sanket Sonavane

Sanket Sonavane Senior Developer, IoT Enthusiast, Photographer, Bike Rider, Chef, AndroidUser, MacOSX Fanatic ;) Loves computers, programming, web developement, micro-controllers, gadgets, automation and many more such tech innovations that defines the way we live in the modern age and likes to explore what more can be done to help the human race :)

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 )

Connecting to %s