Puttygen server refused our key

I have solved this problem, puttygen is a third-party software, ssh key which generated by it didn't be used directly, so you must make some changes. For example, it look like this

- BEGIN SSH2 PUBLIC KEY - Comment: "rsa-key-20170502" AAAAB3NzaC1yc2EAAAABJQAAAQEAr4Ffd3LD1pa7KVSBDU+lq0M7vNvLp6TewkP7 *******C4eq1cdJACBPyjqUCoz00r+LqkGA6sIFGooeVuUXTOxbYULuNQ== - END SSH2 PUBLIC KEY - I omit some of the alphabets in the middle, replaced by *, if not, StackOverflow told me that the code format is wrong, do not let me post。

this is my ssh key generated by puttygen, you must change to this

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAr4Ffd3LD1pa7KVSBDU+lq0M7vNvLp6TewkP7wfvKGWWR7wxA8GEXJsM01FQw5hYWbNF0CDI7nCMXDUEDOzO1xKtNoaidlLA0qGl67bHaF5t+0mE+dZBGqK7jG9L8/KU/b66/tuZnqFqBjLkT+lS8MDo1okJOScuLSilk9oT5ZiqxsD24sdEcUE62S8Qwu7roVEAWU3hHNpnMK+1szlPBCVpbjcQTdiv1MjsOHJXY2PWx6DAIBii+/N+IdGzoFdhq+Yo/RGWdr1Zw/LSwqKDq1SmrpToW9uWVdAxeC4eq1cdJACBPyjqUCoz00r+LqkGA6sIFGooeVuUXTOxbYULuNQ== yourname@hostname In my case, I have deleted some comments, such as

- BEGIN SSH2 PUBLIC KEY - Comment: "rsa-key-20170502" - END SSH2 PUBLIC KEY - and add ssh-rsa at the beginning, add yourname@hostname at the last. note: not delete== in the last and you must change "yourname" and "hostname" for you, In my case, is uaskh@mycomputer, yourname is that you want to log in your vps .when all these things have done, you could to upload public-key to uaskh's home~/.ssh/authorized_keys by cat public-key > ~/.ssh/authorized_keys then sudo chmod 700 ~/.ssh sudo chmod 600 ~/.ssh/authorized_keys then you must to modify /etc/ssh/sshd_config, RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys my operating system is CentOS 7, This is my first time to anwser question, I will try my efforts to do, Thank you!

Puttygen generate SSH key

Puttygen SSH server refused our key

Puttygen import private key

Puttygen extract private key

Puttygen rsa private key