I am also trying to set up ssh. I installed OpenSSH on Ubuntu server, and downloaded WinSCP for my Windows computer. Both machines are in my home office right now, but the server will be relocated to a business office. I will continue to administer the server so want access from my home office. I need the server to be secure, so I want to use key authentication. My client machine is Windows so I can't run ssh-copy-id, so I just copied the .pub file to the server then copied it to authorized_keys. It's rejecting my key. I have passwords enabled for testing, but want to disable passwords when I actually connect through the internet. I tried to have WinSCP generate the keys and copy the .pub file to the server, and I generated keys on the server and copied the private key to my Windows desktop. WinSCP requires "importing" the private key, it adds some of it's own stuff such as the client's MAC address. Either way the server just rejects the key.
I have ensured PubkeyAuthentication is yes, AuthoriedKeysFile is uncommented, and issued the ssh restart command after each change to the server's config file.
What am I doing wrong?
Rob Dyck