I don't have this problem. I also looked at this article, with no success. I can SSH ~in~ to the Pi without issue (server -> Pi), but I cannot do the reverse (Pi -> server) without it asking for the destination password (NOT passPHRASE). I have verified that the keys are properly transferred. I used this (as we do) to do so:
cat .ssh/pikey_rsa.pub | ssh -tt user@server "cat >> ~/.ssh/authorized_keys
but they just don't work. Whenever I ssh user@serverIP
, it will not just dump me in; it asks for the passsword (NOT passPHRASE): user@serverIP's password:
at which point, well, I have to enter the friggin' password, defeating the entire purpose of the ssh key.
What minutia am I missing?
I should probably note that I am remoting IN to the Pi to then remote IN to the server, ala: main -> Pi -> server. I don't see that it should have an impact, but just to be complete, there you go.
I've rebuilt the keys six times trying to eliminate key error. I have manually scp'd keys across and manually added them to the auth file. I tried a USB transfer for heaven's sake! I'm out of ideas.
selinux
is a common source of public key auth blockage, especially if you've been fiddling around withauthorized_keys
without also fiddling around withrestorecon
– thrig Mar 04 '18 at 05:49pikey_rsa
as your ssh client identity? (If you don't know then you probably aren't, and so there's no private key to match the public key you copied to the server.) 2. Do you have correct permissions and ownership for the directories from/
down to~/.ssh
on the server? (If any are writeable other than by root or the target user then that disables key-based authentication.)