How to connect FTP Server using WinSCP with SSH key ?

To connect to an FTP server using WinSCP with an SSH key, you typically follow these steps:

  1. Launch WinSCP:
  • Open the WinSCP application.
  1. New Site Configuration:
  • Click on the “New Site” button.
  1. Protocol Selection:
  • In the “File protocol” dropdown, select SFTP (Secure File Transfer Protocol).
  1. Server Details:
  • Enter the hostname or IP address of the FTP server in the Host name field.
  • Enter the port number if it is different from the default SFTP port (22).
  1. User Details:
  • Enter the username for the FTP server in the User name field.
  1. SSH Key Configuration:
  • Click on the “Advanced” button to open the advanced site settings.
  • In the “Advanced Site Settings” dialog, go to the SSH section and then Authentication.
  • In the “Private key file” field, click on the ... button to browse and select your private SSH key file.
  1. Optional: SSH Key Conversion:
  • If your private key is in a format not directly supported by WinSCP (like PEM), you may need to convert it to a PPK (PuTTY Private Key) format using PuTTYgen.
    • Open PuTTYgen.
    • Load your existing private key.
    • Save the private key in the PPK format.
  1. Save and Connect:
  • Click “OK” to save the advanced settings.
  • Back in the main WinSCP window, you can save the session if you want to reuse it later by clicking “Save”.
  • Finally, click the “Login” button to connect to the FTP server using your SSH key for authentication.

If everything is correctly configured, you should be able to connect to the FTP server securely using your SSH key.

Leave a Reply