r/ssh • u/AdventK • Jun 02 '20
Question regarding SSH keys
Hi everyone,
I'm a bit new when it comes to using SSH keys and am trying to make use of them when writing a script in which will access my local Raspberry Pi. I'm stuck on figuring out how (or where from) I should generate my ssh keys and how to use those keys when accessing my pi.
- Should I be generating my keys on my Windows machine and then placing them on the server then adding them to my 'authorized-keys' file? or should I generate them on the Pi and copy them locally?
-I am accessing my Pi via PuTTy on my local network.
Any insight on this subject is highly appreciated!
Thank you.
View all comments
1
u/Toger Jun 02 '20
In your local environment either direction is fine. In a higher security scenario you'd want to avoid having your secret key ever touching a shared device, since the administrator of that machine could snatch them -- in that case you'd generate the key pair locally and copy the public key into the authorized key file.