Skip to main content
2 of 6
Expanded answer to include Windows version and batch file

I am using Windows 10 built-in OpenSSH. I copied my public and private keys to %userprofile%.ssh I wrote a small batch script for my users to use after they find their keys from the cmd prompt with: where *.pub

Rem You must replace and with actual file names.
md %userprofile%/.ssh
copy % userprofile%/.ssh
copy % userprofile%/.ssh cd %userprofile%/.ssh
icacls ./<PublicKeyFilename> //inheritance:r
icacls ./<PrivateKeyFilename> //inheritance:r
icacls ./<PublicKeyFilename>//grant:r "%username%":"(F)"
icacls ./<PrivateKeyFilename> //grant:r "%username%":"(F)"

The final step was right-clicking the file, Properties, Security, and editing the permissions to remove everyone except my username and setting the permissions for myself to Read.