keboose
Explorer
- Joined
- Mar 5, 2016
- Messages
- 92
I am trying to set up key pair authentication for SSH login. I have disabled password login completely for SSH.
I followed this guide for generating the keys, and setting them up in Putty (I'm using Windows 10.)
After encountering errors, I searched around and checked these things:
In the server GUI, I see this line in the log:
I made a test user ('sshtest') and used the same public key. IT WORKED! I don't know why, though. One thing I see different about the setups is that my real user's folder is missing a bunch of generated files that are present in the test folder (.cshrc, .login, .mail_aliases, .profile, .shrc, .history, .login_conf, .mailrc, .rhosts). Should I have those in my real user's folder? If so, how can I re-generate them? Is there anything else I should try?
I followed this guide for generating the keys, and setting them up in Putty (I'm using Windows 10.)
After encountering errors, I searched around and checked these things:
- File/Folder permissions. my user's .ssh folder permissions are 700 (drwx --- ---), and the authorized_keys file permissions are also 700 (-rwx --- ---)
- checked that the public key I copied from PuttyGen is all on one line in the authorized_keys file (and matched the format of "ssh-rsa [key] [comment, in this case 'rsa-key-20180319']"
- made sure to restart the SSH service after every change I made
Using username "[my username]".
Server refused our key
In the server GUI, I see this line in the log:
error: Received disconnect from 192.168.1.36 port 59863:14: No supported authentication methods available [preauth]
I made a test user ('sshtest') and used the same public key. IT WORKED! I don't know why, though. One thing I see different about the setups is that my real user's folder is missing a bunch of generated files that are present in the test folder (.cshrc, .login, .mail_aliases, .profile, .shrc, .history, .login_conf, .mailrc, .rhosts). Should I have those in my real user's folder? If so, how can I re-generate them? Is there anything else I should try?