Server Refused Our Key
I've tried doing a keygen through PuTTY and adding the public key via nano copy and paste in ~/.ssh/authorized_keys , and also adding it through the Linode Dashboard. Every time I try to log on with the user and private key, I get a prompt saying "Server Refused Our Key", then a password login (which works fine). I'm lost as to what the issue could be, I've tried deleting the keys and making a new pair. I've made sure the chmod for the .ssh folder and 'authorized_keys' file is 700 and 600.
3 Replies
✓ Best Answer
SOLVED
Used PSFTP to move a .txt file of the private key over to the .ssh/ directory, then renamed to 'authorized_keys'
Are you adding the public key when launching the new linode? Then you don't need to add it manually.
Try printing the contents of /var/log/auth.log
for more details on the error.
Jan 31 21:37:34 XX-XX-XXX-XX sudo: pam_unix(sudo:session): session closed for us er root
Jan 31 21:37:42 XX-XX-XXX-XX sshd[1181]: pam_unix(sshd:session): session closed for user trisolix
Jan 31 21:37:42 XX-XX-XXX-XX sudo: pam_unix(sudo:session): session closed for us er root
Jan 31 21:37:42 XX-XX-XXX-XX systemd-logind[519]: Session 12 logged out. Waiting for processes to exit.
Jan 31 21:37:42 XX-XX-XXX-XX systemd-logind[519]: Removed session 12.
Jan 31 21:37:52 XX-XX-XXX-XX systemd: pam_unix(systemd-user:session): session cl osed for user trisolix
Jan 31 21:37:53 XX-XX-XXX-XX sshd[1282]: Accepted password for trisolix from XXX.XXX.XX.XXX port 51599 ssh2
Jan 31 21:37:53 XX-XX-XXX-XX sshd[1282]: pam_unix(sshd:session): session opened for user trisolix(uid=1000) by (uid=0)
Jan 31 21:37:53 XX-XX-XXX-XX systemd-logind[519]: New session 15 of user trisoli x.
Jan 31 21:37:53 XX-XX-XXX-XX systemd: pam_unix(systemd-user:session): session op ened for user trisolix(uid=1000) by (uid=0)
Jan 31 21:38:23 XX-XX-XXX-XX sshd[1327]: Invalid user ansible from XX.XXX.XX.XXX port 47982
Jan 31 21:38:23 XX-XX-XXX-XX sshd[1327]: pam_unix(sshd:auth): check pass; user u nknown
Jan 31 21:38:23 XX-XX-XXX-XX sshd[1327]: pam_unix(sshd:auth): authentication fai lure; logname= uid=0 euid=0 tty=ssh ruser= rhost=XX.XXX.XX.XXX
Jan 31 21:38:24 XX-XX-XXX-XX sudo: trisolix : TTY=pts/0 ; PWD=/var/log ; USER=ro ot ; COMMAND=/usr/bin/cat auth.log
Jan 31 21:38:24 XX-XX-XXX-XX sudo: pam_unix(sudo:session): session opened for us er root(uid=0) by trisolix(uid=1000)
I truncated the log before I logged back on via SSH. Also Fail2Ban is installed and my home IP is added to the ignoreip element in the jail.local file, I don't know if that's messing with it at all.