Question

Server refused our key after attempting to login with putty

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.

Subscribe
Share

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…

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.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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.