Captain Briney wrote:
I've tried that three times now, before I even posted here, and once again it says "Server refused our key."
I even completely removed SSH and reinstalled it so that I could start over.
What do I have to change in the sshd_config file to get this to work properly?
I'm extremely uncomfortable leaving my server open to password authentication.
You're not making it easy for us, by not providing any details other than "it doesn't work".
First thing to do is get this running as a non-root user. So, for example, I'd like to see the output of
grep -v '^#' /etc/ssh/sshd_config | grep -v '^$'
ls -ld / /home /home/user /home/user/.ssh /home/user/.ssh/authorized_keys
(where "user" is your username; assuming the home directory is /home/user)
cat ~/.ssh/authorized_keys
On the server, as root, "/usr/sbin/sshd -p 2222 -d"
On the client, "ssh -v -p 2222 -i /path/to/private/key user@server"
(and show the output of both).
Every time I've had to fix peoples ssh issues it's either been permission problems or corrupted public key file, or the user wasn't actually presenting the correct private key.