Server refused our key after attempting to login with putty

Posted January 11, 2016 6.6k views
Getting StartedSecurity

I have been using filezilla and putty all day today. Now, I can use neither. putty says server refused our key and filezilla simply will not connect to server Authentication failed.

I tried using root password in putty but had no luck with that either.

  • OK after looking in var secure logs, i was attempting to login to /bin/bash\r

    The \r appended itself after using a windoz editor as a carriage return.

    usermod-s /bin/bash root fixed the problem. Support ticket had the solution after I pointed out the log file.

  • I had the same problem but my breakthrough was steve looking at the var secure logs at /var/log/auth.log when I looked at mine I saw a message that my user ownership is bad.

    [ Authentication refused: bad ownership or modes for directory /home/<username>]

    fixed it to chmod 755 <username> directory and I was able to log in using pub/private key..

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

There’s really not much to go on - if your key doesn’t work, either you’re not providing the key properly, or your server’s authorized_keys file does not contain that key.