Contents
Why does SSH public key authentication not work?
As guntbert points out, also check that the directory and files are owned by you. The permissions won’t make sense (or work) otherwise. Who owns the keys in authorized_keys on B? (The bit that says user@host after the key.) Is it root@A ? That is, in looking at ~/.ssh/authorized_keys, what is the equivalent of bert@etherbert for your set-up:
Is there a public key for Windows 10 SSH?
I’ve installed the Windows 10 ssh package and set up sshd. Logging in with a password works great, but I’m unable to get public-key login to work. I have the same authorized_keys file in .\\ssh\\authorized_keys as I to on Linux boxes where public-key login works great. I also ran:
How to add a private key to SSH?
The directory ~/.ssh MUST be owned by the user, not root. So change that and it will work. To avoid having to type the passphrase for your private key every time you use ssh-agent. ssh-add .ssh/id_rsa will add the key to the agent, from then on the agent will provide the key to ssh.
What should I do if my SSH key is skipped?
If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session. Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.
Why does SSH not work on Windows 10?
It isn’t critical, SSH isn’t exposed to the Internet, but some of the scripts I use would do much better with public key authentication. I should also note when I set up the server I used my Microsoft account, I have been wondering if that has anything to do with it, so I may try to set up a straight local account and see if that fixes it.
Do you need to give your SSH client the passphrase?
If your private key is passphrase-protected, you’ll need to give ssh (client) the passphrase every time. Or you can use ssh-agent, or a GNOME equivalent. Your updated trace is consistent with a passphrase-protected private key.
How to add a public key to SSH?
This tells ssh to accept file authorized_keys and look in the user home directory for the key_name sting written in the .ssh/authorized_keys file. 5 Set permissions on the target machine passwordAuthentication no