When a key is generated on putty using PuttyKeyGen on widows, there is a very high chance that the key will not work on Linux. Usually, the solution to this issue will be to convert the key using PuttyKeyGen. Please see this link on how to convert PuttyKeyGen key for Linux.
After you convert the key for Linux, if the key does not work, then your Linux server need a key that is trusted. Without it, you will get a “key mismatch error” or it will ask for a password eventhough the key was saved without one. This error usually occurs on Linux servers or cloud Linux servers on AWS, Azure, Linode and so on. The more secure the server is the higher the chance this error will occur.
The solution to this issue will be to directly create the key in your Linux server and store it in your “./ssh” folder
To generate your RSA key pair, you need to run the following command “ssh-keygen -t rsa”. When you run the command, you need to follow the prompts on the screen as shown below.
After successful creation of the key pair, you can navigate into the /.ssh folder and run the “ls” command to list the generated keys.
Next, you need to copy and paste your public key into your Hosted~FTP~ account. To see the content of the id_rsa.pub file, you run the “cat id_rsa.pb” command.
Next, you need to highlight the key and copy the public key and paste it into your user setup under the public key section located at the bottom of the user setup page.