Whether you generate public key via Puttygen on Windows or the Ssh-keygen command on Linux, you cannot use it directly in the other's environment. This is the main reason I wrote this blog. is to explain how to translate into a format that the other person can recognize.
One, the first method: the use of Ssh-keygen
1. Use Ssh-keygen. Execute the command on Linux:
Ssh-keygen 1024x768 -t RSA
2. The default is to generate two files under $home/.ssh/:
Id_rsa id_rsa.pub
3. Change the id_rsa.pub to Authorized_keys, then modify the permission to 600.
[Email protected]. SSH CP id_rsa.pub Authorized_keys[[email protected]. SSH chmod Authorized_keys
4. Open another file with the VI editor, ID_RSA (private key). Copy the content and save it on the desktop with a TXT file. Then import it with Puttygen.
Note Modify the "number of bits in a generated key:" to 1024. Since we used the Ssh-keygen command earlier, we already indicated 1024.
5. Save as private key, rename, the next time you start putty, select the auth under SSH. In the private key file for authentication, find the location of the private key. Can be directly logged in.
Second, use Puttygen to generate the key.
Third, from the perspective of RSA Technology analysis of the two tools of the same and different. In order to find a more convenient way.
RSA key: How to log in directly to a Linux server by generating a key.