Here is a much easier command to get your key added to an authorized keys file on a remote server.
~$ ssh-copy-id username@remotehost.local
Hello,
Windows = Still Exists
Administration from Windows of Linux = Putty
Key-based authentication from Putty = Puttygen
Launch the key generator included with Putty called PuTTYgen.
Click Generate. Move the mouse around for some good ol random numbers.
Stick a passphrase on it if you’re feeling insecure about yourself.
Save the public key somewhere and save the private key somewhere too. [...]
Sometimes I feel like Linux hasn’t been accepted publicly because people are concerned about getting their public ssh key appended to the authorized_keys file on the servers they are trying to administer. They think they have to scp it over, then ssh in, and finally append it to the correct file.
It’s such a shame because [...]