ssh will complain about permissions on .ssh. The permissions of the directory should be 700 (dwrx------)
authorized_keys needs to be 640 (-rw-r-----)
Also, you don't have to restart sshd after copying the ssh keys, authorized_keys will start working immediately.
If you are using a Linux host, ssh-copy-id will take care of copying your public key to a remote host and appending it to the authorized_keys file. (Under macOS you can install it with brew install ssh-copy-id).
Again, great write-up, using ssh-keys is paramount to good security practices.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good write-up, but two changes:
700 (dwrx------)
640 (-rw-r-----)
Also, you don't have to restart sshd after copying the ssh keys, authorized_keys will start working immediately.
If you are using a Linux host, ssh-copy-id will take care of copying your public key to a remote host and appending it to the authorized_keys file. (Under macOS you can install it with
brew install ssh-copy-id
).Again, great write-up, using ssh-keys is paramount to good security practices.