Rest PUT vs POST actions by example
So, I just tried setting up login via public key on a new server and ran into the following error:
What the hell?!
That wasn't helpful at all. Was my SSH config messed up? The client first tried public key authentication, but it was skipped.
After some time digging around, I finally figured out the issue: bad permissions in the .ssh directory.
Turns out, SSH doesn't like it when your home directory ~/
or ~/.ssh
directory have group write permissions. And honestly, that makes total sense to me as your home directory should only be writable by you, right?
So, I ran chmod 700 ~/.ssh
and chmod 600 ~/.ssh/authorized_keys
to fix the permissions.
There are other ways to solve this issue, such as disabling this strict mode (which I definitely wouldn't recommend at all).
Featured image by Travis Saylor