Server refused our key after attempting to login with putty

January 11, 2016 1.3k views
Getting Started Security

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..

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.

Have another answer? Share your knowledge.