How to Use SSH Keys with SFTP Clients

This guide explains how to use SSH keys with popular SFTP clients such as WinSCP, FileZilla and FTP Rush.

💡 Tip

Your service hostname, SSH username and SSH access details can be found in the Client Area under your service details.


Before You Begin

Before using SSH keys with WinSCP, FileZilla or FTP Rush, you need to generate an SSH key and add the public key to your service.

If you have not done this yet, please follow our SSH key setup guide first.

âš  Important

Only your private key should be selected in WinSCP, FileZilla or FTP Rush. Never upload, paste or share your private key with anyone.


Private Key File

When configuring your SFTP client, select your private key file. This is the key file without the .pub extension.

The default private key location depends on your operating system:

  • Windows – usually located in your Windows user profile under the .ssh folder.
  • Linux – usually located in your home directory under the ~/.ssh/ folder.
  • macOS – usually located in your user profile under the ~/.ssh/ folder.

Windows examples:

C:\Users\YourUser\.ssh\id_ed25519
C:\Users\YourUser\.ssh\id_rsa

Linux examples:

/home/youruser/.ssh/id_ed25519
/home/youruser/.ssh/id_rsa

macOS examples:

/Users/youruser/.ssh/id_ed25519
/Users/youruser/.ssh/id_rsa

If you generated the key using the default settings, the most common file name is id_ed25519.

âš  Important

Do not select the public key file. Public key files usually end with .pub, for example id_ed25519.pub or id_rsa.pub.


WinSCP

Step 1 – Create a New Session

Open WinSCP and create a new login session.

Fill in the following fields:

  • File protocol – SFTP.
  • Host name – your service hostname.
  • Port number – 22.
  • User name – your service username.

Step 2 – Select Your Private Key

Click Advanced, then go to:

SSH → Authentication

In the Private key file field, select your private key file.

Example private key paths:

  • Windows – C:\Users\YourUser\.ssh\id_ed25519
  • Linux – /home/youruser/.ssh/id_ed25519
  • macOS – /Users/youruser/.ssh/id_ed25519

Step 3 – Connect

Click OK, then click Login.

If your private key has a passphrase, WinSCP will ask for it during login.

✔ WinSCP Connected

If the login succeeds, WinSCP is now using your SSH key for SFTP access.


FileZilla

Step 1 – Add Your Private Key

Open FileZilla and go to:

Edit → Settings → Connection → SFTP

Click Add key file and select your private key file.

Example private key paths:

  • Windows – C:\Users\YourUser\.ssh\id_ed25519
  • Linux – /home/youruser/.ssh/id_ed25519
  • macOS – /Users/youruser/.ssh/id_ed25519

Step 2 – Create a New Site

Open File → Site Manager and click New Site.

Fill in the following fields:

  • Protocol – SFTP - SSH File Transfer Protocol.
  • Host – your service hostname.
  • Port – 22.
  • Logon Type – Key file.
  • User – your service username.
  • Key file – select your private key file.

Step 3 – Connect

Click Connect.

If your private key has a passphrase, FileZilla will ask for it during login.

✔ FileZilla Connected

If the login succeeds, FileZilla is now using your SSH key for SFTP access.


FTP Rush

Step 1 – Create a New Site

Open FTP Rush and create a new site profile.

Fill in the following fields:

  • Protocol – SFTP.
  • Host – your service hostname.
  • Port – 22.
  • User – your service username.

Step 2 – Select Key Authentication

Open the authentication or SSH/SFTP settings for the site profile.

Select Public Key or Private Key authentication, depending on the option name used by your FTP Rush version.

Select your private key file.

Example private key paths:

  • Windows – C:\Users\YourUser\.ssh\id_ed25519
  • Linux – /home/youruser/.ssh/id_ed25519
  • macOS – /Users/youruser/.ssh/id_ed25519

Step 3 – Connect

Save the site profile and connect to your service.

If your private key has a passphrase, FTP Rush will ask for it during login.

✔ FTP Rush Connected

If the login succeeds, FTP Rush is now using your SSH key for SFTP access.


Troubleshooting

Permission Denied

If you receive a Permission denied error, verify that:

  • The public key has been added to your service.
  • You selected the correct private key in your SFTP client.
  • You did not select the public key file ending with .pub.
  • You are using the correct service username.
  • You are using the correct service hostname.
  • You are connecting with SFTP, not FTP.

Passphrase Prompt

If your private key was created with a passphrase, you must enter that passphrase when connecting. This is not your service password.


Verification

âš  Important

Make sure you are using SFTP on port 22. SSH keys are used for SSH/SFTP authentication and do not apply to plain FTP connections.

✔ SSH Key Authentication Complete

If your SFTP client connects successfully without asking for your service password, SSH key authentication is configured correctly.

Was this answer helpful? 0 Users Found This Useful (0 Votes)