2.5.2.2.3.4. Configure key-based authentication in WinSCP

When connecting via SFTP or SCP in WinSCP, key-based authentication can be used instead of passwords.

  1. Generate a key pair using any of the methods.
  2. Add a public key on the server.
  3. Convert the private key to the .ppk format using the PuTTYgen utility:
    1. Run puttygen.exe.
    2. In the main menu, click on "Conversions → Import key":
    3. Select the generated private key file id_rsa.
    4. Click "Save private key":
    5. If a warning about the absence of a passphrase appears, click "Yes" to continue without it (or you can click "No" to return and specify it):
    6. Save the obtained private key in a secure location.
  4. When configuring a connection via SFTP or SCP in WinSCP, instead of entering a password, do the following:
    1. Click "Advanced":
    2. In the section "SSH → Authentication", in the field "Private key file", use the button with three dots to specify the path to the previously saved private key and click "OK":
  5. Check the connection.
Content