Connect to SFTP for Shared Hosting Accounts Using FileZilla

SFTP (SSH File Transfer Protocol) provides a secure method for transferring files to your InMotion Hosting Shared Hosting account. Unlike standard FTP, SFTP uses SSH key authentication instead of your cPanel login credentials, offering stronger security for your file transfers.

This guide walks you through generating SSH access keys and configuring FileZilla to connect via SFTP.

Generate SSH Access Keys in cPanel

Before connecting with SFTP, you must create public and private SSH keys through cPanel. If you already have keys configured for SSH access on your shared or reseller server, you can use those same keys for SFTP.

To generate new keys:

  1. Log in to your cPanel account.
  2. Under Security, click SSH Access.
  3. Click Manage SSH Keys, then Generate a New Key.
  4. Enter a strong password, confirm it, and click Generate Key.
  5. Return to Manage SSH Keys and click Manage next to your new public key.
  6. Click Authorize to enable the key for connections.

After authorizing your public key, download your private key in PPK format:

  1. Under Private Keys, click View/Download next to your key.
  2. Scroll to Convert the key to PPK format.
  3. Enter your passphrase and click Download Key.

Configure FileZilla for SFTP

Setting up FileZilla for SFTP requires two steps: adding your private key file and creating a connection profile.

PPK File Version Compatibility

When cPanel converts your key to PPK format, it may generate either PPK version 2 or version 3, depending on your server’s cPanel version. According to the FileZilla documentation, FileZilla version 3.55.0 and later supports PPK v3 keys. If you use an older FileZilla version and encounter issues loading your key file, you have two options: update FileZilla to the latest version, or use a different FTP client such as WinSCP or Cyberduck.

Add Your Private Key File

  1. Open FileZilla.
  2. From the top menu, click Edit, then Settings.
  3. In the Settings window, click SFTP in the left sidebar.
  4. Click Add key file in the right panel.

    Add Key File to FileZilla
  5. Navigate to your downloaded PPK file and click Open.
  6. Verify the key appears in the list and click OK to save.

Create the SFTP Connection Profile

  1. Click File, then Site Manager.
  2. Click New Site and give your connection a recognizable name.
  3. Enter the following settings:
    Host: Your domain name (example.com) or server IP
    Port: 2222
    Protocol: SFTP
    Logon Type: Key file
    User: Your cPanel username
    Key file: Browse to your PPK file
  4. Click Connect to establish the SFTP connection.

FileZilla may prompt you to accept the server’s host key on your first connection. Click OK to add it to your trusted hosts.

Troubleshooting Common Issues

Connection Timeout Errors

Verify you are using port 2222, not the standard SSH port 22. Shared and Reseller servers require port 2222 for SSH and SFTP connections.

Authentication Failures

Confirm your public key is authorized in cPanel under SSH Access > Manage SSH Keys. The key status should show “authorized” rather than “not authorized.”

Key File Not Loading

If FileZilla silently fails when adding your key, the file may be in an incompatible format. Update FileZilla to the latest version or regenerate your key using PPK version 2 format through PuTTYgen.

Password Prompts Appearing

If FileZilla keeps asking for a password despite having your key configured, verify the Logon Type is set to “Key file” rather than “Ask for password” or “Interactive.”

Why Use SFTP Instead of FTP?

SFTP encrypts both your credentials and file data during transfer, making it the preferred method for secure file management. For websites handling sensitive information or requiring PCI compliance, when you fail PCI compliance for FTP being open, you can use SFTP or SCP to connect to your server.

Standard FTP transmits data in plain text, which creates security vulnerabilities on shared networks. SFTP eliminates this risk by tunneling all communication through an encrypted SSH connection.

Next Steps

After establishing your SFTP connection, you can upload, download, and manage files in your hosting account securely. For additional file transfer options, explore these resources:

If you encounter connection issues or need help with SSH key generation, InMotion Hosting’s support team is available 24/7 to assist.

Share this Article
Carrie Smaha
Carrie Smaha Senior Manager Marketing Operations

Carrie enjoys working on demand generation and product marketing projects that tap into multi-touch campaign design, technical SEO, content marketing, software design, and business operations.

More Articles by Carrie

31 thoughts on “Connect to SFTP for Shared Hosting Accounts Using FileZilla

    1. Good question! The article is referring to SFTP on Shared Hosting accounts, so you will not be able to disable standard FTP on those. If you have a VPS or Dedicated Server, you can close the port or turn off the service.

  1. Thank you for writing instructions that are easy to read, understand and follow. Unfortunately, I am getting
    Error: Connection timed out after 20 seconds of inactivity
    Error: Could not connect to server
    Status: Disconnected from server
    Any suggestions?

  2. I am using filezilla and getting following error. Can you please suggest what is that I am doing wrong. Status: Connecting to mydomain.com:2222…
    Response: fzSftp started, protocol_version=8
    Command: keyfile “C:\kdfsd\pkey.ppk”
    Command: open “[email protected]” 2222
    Error: ssh_init: Host does not exist
    Error: Could not connect to server
    Status: Waiting to retry…

  3. There’s a step missing here!

    Once you’ve generated a key, you must go back to the Manage Keys section, select Manage on the key you just generated, then AUTHORISE the key!  Otherwise, it will never work.

    1. Hello,

      It sounds like the key Filezilla is trying to authenticate with is incorrect, I would recommend making sure you have the correct key in the configuration, By default, it will use the one for the account you are logged in as.

      Best Regards,
      Kyle M

  4. I noticed that if I enter a wrong password when filezilla ask for it the connection will still succeed. Is that something expected once the key setup has been done?

    I even modified my cpanel password, relaunch filezilla, and the connection will still succees whatever the password I enter.

     

    is that the expected behaviour?

    1. Keys become the authentication method for logging in once they are set up. That’s why the password no longer matters. That’s the point of keys, so you dont need passwords.

    1. Hello JB,

      When you create the account in cPanel, then you can limit what the FTP user can access based on the folder that you indicate in their settings. If you’re trying to isolate them to a specific folder, then that folder cannot be a parent folder to numerous other folders.

      If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

  5. I was able to get this working in Coda 2, finally! I found that using the keys generated through cPanel was not possible in Coda, so I tried generating my own through Terminal like this:

    ssh-keygen

    Give it a unique name, like inmotionhosting and set your passphrase – just like you do through cPanel.

    After generating the key, add it to your Keychain with:

    ssh-add -K inmotionhosting (but replace ‘inmotionhosting’ with whatever you name your key)

    Once that’s done, head over to Security -> SSH Shell Access in cPanel and click Manage SSH Keys. Then click Import Key.

    Enter the name that you gave your key in the relevant field. Then copy and paste the contents of your private and public key files that you generated earlier in their respective boxes. Type in your passphrase where it asks for it.

    If you want to quickly view the contents of these key files in Terminal, use these commands (assuming you named your key ‘inmotionhosting’):

    cat ~/.ssh/inmotionhosting

    cat ~/.ssh/inmotionhosting.pub

    Copy and paste the results of those commands into the private field (first one) and then the public field (second one) in cPanel. Then click Import. Go back to the list of your keys and click Manage Authorization next to the key name you just imported, then click Authorize.

    Go back to Terminal on your Mac and create a new ‘config’ file in the ‘.ssh’ directory if there is not already one there. You can do this with nano like this:

    nano ~/.ssh/config

    In it, add a new host record that looks like this:

    Host YOURSERVERNAME.inmotionhosting.com

    HostName YOURSERVERNAME.inmotionhosting.com

    User YOURUSERNAME

    IdentityFile ~/.ssh/inmotionhosting

    Port 2222

    Then save the file with CTRL-X and hit Y to confirm, then Enter.

    Go back to edit your site within Coda, and go to the Server tab. Select SFTP under Protocol, then type in the name of your shared server in the Server field. Leave everything else blank. The config file that you just created will be pulled when attempting to connect and will use the details you entered above.

    By doing all of this, I am now able to successfully connect to my account via SFTP in Coda 2!

  6. Hey there,

    I followed the steps to add the key to my mac’s keychain, then tried connecting with Coda, restarting coda after every step. It still doesn’t work: says that the login doesn’t authenticate.

    1. Hello bennyp,

      Thank you for contacting us. An authentication error is usually related to username, and password. I recommend confirming your FTP Settings are correct and without misspellings.

      If your problems persist, I recommend checking the FTP logs for additional errors, or clues. If you are on a shared server, Live Support can help you with this.

      Thank you,
      John-Paul

Leave a Reply