To connect to an FTP server using WinSCP with an SSH key, you typically follow these steps:
- Launch WinSCP:
- Open the WinSCP application.
- New Site Configuration:
- Click on the “New Site” button.
- Protocol Selection:
- In the “File protocol” dropdown, select
SFTP
(Secure File Transfer Protocol).
- 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).
- User Details:
- Enter the username for the FTP server in the
User name
field.
- 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 thenAuthentication
. - In the “Private key file” field, click on the
...
button to browse and select your private SSH key file.
- 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.
- 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.