I´m struggling with it, don´t know if the problem is with me or the configuration. I always did the following and it always worked. Of course the key is in the right location and with the right format. User get a “server refuse our key” and if he enters his password, he can SSH, even when is stated that the password authentication is disabled:
if the user runs ssh -vvv user@host we can see an “invalid key format” error. But well my key works and we use the same software to generate our Keys (PuttyGen). We tried as well with all the exporting options in the tool without success…so main question is why my key works as root and as well as normal user (I created one just to double check it wasn´t that problem).
What it as well puzzles me is that PasswordAuthentications is disabled, but even with that it ask the user for a password after “server refuse our key” error.
Ok I found the solution. Even when PuttyGen is on the last version. The key generated wasn´t right. I asked the user to generate two new keys (Private and Public) with PowerShell as stated here Generate SSH Key on Windows with Windows CMD/PowerShell | GridPane and worked smoothly. Just crazy.