Server refused our key - Centos 7

I generated rsa key-pair, Using puttygen.exe running on windows, I imported the private key and tried to use it to login to a CentOS Linux release 7.5.1804 (Core) (running on VirtualBox) and it gives the following error: "server refused our key".
I tried to search for solution and some of the recommendations were to chmod of .ssh directory to 700 while authorized_keys is set at 600. I wish to say that I actually created the authorized_keys directory under .ssh directory.
I also generated rsa keys with puttygen.exe and copied the public key to my linux machine and tested, but the error remains.
Please could anyone offer some assistance.
Thanks in advance.

Chiadi

------ Post updated at 12:57 PM ------

Thanks all; got it figured out. The problem was creating a directory instead of a file.
I wish to say that I actually created the authorized_keys directory under .ssh directory.
Thanks all once more.

1 Like