SFTP guides

Set up an SFTP connection in FileZilla

SFTP is the SSH file transfer protocol. This guide sets Protocol to SFTP, chooses a password or a key file, and treats the host-key prompt as part of the setup.

  • Reviewed October 21, 2026
  • Educational reference
  • FileZilla Client 3.71.x context

SFTP is the file-transfer subsystem of SSH. When a host says “upload with SFTP” or “use SSH on port 22,” this is the FileZilla setup that matches those words. It is not a more secure mode of the FTP protocol. The FTP command channel, PASV, and AUTH TLS never appear in a normal SFTP session.

FileZilla Client has supported SFTP for years. The free client’s SFTP support is part of the product the project describes on its homepage. You do not need FileZilla Server for it. FileZilla Server, as the project describes it, is an FTP and FTPS server, not the SSH service your SFTP account uses. The SSH server is OpenSSH or another SSH daemon the host already runs.

Prerequisites

From the administrator, get:

  • The SSH hostname. It may be the website name, or a different name such as files.example.com.
  • The port, if it is not 22.
  • The username. On shared hosting it is often the account username, not an email address, unless the host said otherwise.
  • Either a password or a private key file that matches a public key already installed for that user.
  • The directory you are allowed to write, if the home directory is not the web root.

You need FileZilla Client installed from the project site, as described in the installation guide. You need the private key on this computer only. The public key stays on the server. If you have only a .pub file, you do not yet have the key FileZilla must use.

Diagram of FileZilla connecting through one encrypted SSH session to an SFTP subsystem and a remote file list.
One SSH session carries both the commands and the files. There is no second FTP data port to open.

Password login

  1. Open File → Site Manager → New site. Name it for the environment, not just the vendor.

  2. Set Protocol to SFTP - SSH File Transfer Protocol. Set Host to the SSH hostname. Set Port to 22 only if you want it visible. The Site Manager wiki says to fill the port when it differs from the standard. 22 is the standard, so a blank port is also coherent.

  3. Set Logon Type to Normal if this computer should store the password, or Ask for password if it should not. Enter the username. There is no Encryption dropdown for SFTP. If you still see FTP encryption choices, the protocol is still FTP.

  4. On the Advanced tab, set the default remote directory if you were given one, such as /home/siteuser/public_html.

  5. Click Connect. The first contact with a host shows an SSH host-key prompt. Compare the fingerprint with the value in the host’s control panel or the value the administrator sent you out of band. If you have nothing to compare it with, cancel and ask. Accepting an unseen key teaches FileZilla to trust that key next time.

  6. After the remote pane lists files, disconnect and connect again from Site Manager to prove the entry, not the memory of the dialog, is what works.

Quickconnect can do the same test. The client tutorial says to prefix the host with sftp://. Site Manager is the better record because the protocol is a labeled field.

Key file login

The project howto describes three ways to use SSH keys with the client. The one that belongs in a named site is Logon Type Key file.

  1. Create or select the site as above, with Protocol set to SFTP and the correct user.

  2. Set Logon Type to Key file. Choose the private key. The howto states that this field accepts PuTTY .ppk and OpenSSH .pem private keys. If your key is in another format, convert it with a key tool you trust, then confirm that current FileZilla still lists your format. Release notes for the 3.71 line mention broader key-file support in the bundled SSH code. Read that note if a previously rejected file suddenly matters.

  3. Connect. If the key has a passphrase, FileZilla asks for it. The project forum’s long-standing guidance is that a passphrase on the private key is not the site password, and it is not stored as one. Keep the passphrase somewhere you control.

  4. If the server accepts the key, the remote listing appears. If it falls back to a password prompt, the public key is not installed for this user or you selected the wrong private key.

A second method in the same howto is Edit → Settings → Connection → SFTP → Add key file, then a site whose logon type is Interactive. That loads a key for the client to offer. It is useful when you want the key available without pasting its path into every site. It is easier to misconfigure. Prefer Key file on the site until you have a reason to share one key across entries.

Pageant, the PuTTY authentication agent, is the third method and it is Windows-specific. Use it when your team already runs an agent. Do not install PuTTY only because a generic article said SFTP requires it. FileZilla can use a key file without Pageant.

Expected result

The log shows an SSH connection and a successful authentication. The remote pane lists the home directory or the default remote directory. Creating a harmless test folder and deleting it again, if your account is allowed to, proves write access. Uploading the real site is the upload guide, after you know which directory is public.

A failed host-key change on a later day is not a FileZilla defect. Servers are reinstalled and keys are rotated. When the fingerprint changes, stop and ask why. The prompt exists so a different machine in the middle cannot reuse yesterday’s trust silently.

Common problems

“Authentication failed” immediately after the host key is accepted. The network and the host key were fine. The user, password, or key was not. Check the username for extra spaces. On shared hosting, the SFTP user is sometimes different from the FTP user. Continue with authentication failed.

Connection refused on port 22. The usual causes are that SSH is not listening, or a firewall rejects the port. A hostname that reaches a different machine looks the same. A firewall that only drops port 22 times out instead. Some hosts offer SFTP only after you enable it in the panel. See connection refused. Do not diagnose this with FTP passive mode. SFTP does not use a PASV data connection.

The host told you to use FTPS and you chose SFTP because both sound secure. The login will fail or the port will refuse. Return to the welcome note and use the FTP configuration guide if the words are TLS, AUTH TLS, or explicit FTP.

The key works in OpenSSH on the command line and not in FileZilla. Compare the username and the key path. A command-line config may pick a key and a host alias that FileZilla does not read. FileZilla does not automatically import ~/.ssh/config. Enter the real hostname and the key file in the site.

Directory listing errors that mention PASV. You are on an FTP session. SFTP does not list directories with PASV. Check the protocol field.

Troubleshooting a key that is rejected

Confirm the server has the public half, one line, in the right account’s authorized_keys or in the host’s panel. A key pasted with a line break in the middle will not match. Confirm you did not upload the public key into FileZilla’s Key file field. The howto says importing a site’s public key is not supported, and it would be the wrong file anyway.

If the server only allows keyboard-interactive authentication, Logon Type Interactive matches that method more closely than Normal. The 3.71.1 notes mention a heuristic for keyboard-interactive prompts that are really password prompts. You should still select the logon type your host documented rather than depend on a heuristic.

Security considerations

Trust the host key only after you compare it. A first connection on a hostile network is the moment a forged SSH server is easiest.

Keep the private key off shared drives and out of the web root. Never upload id_rsa or a .ppk into public_html. Permissions on the key file should allow only your user to read it. FileZilla cannot repair a key that has already been copied into a public folder. Treat that key as compromised and replace it.

SFTP encrypts the session. It does not decide whether you are allowed to overwrite production. Use an account that can write only the directory you deploy, and keep a second site entry if you also have a test host. More habits are collected in secure file transfer.

Frequently asked questions

Is SFTP the same as FTP over SSL?

No. SFTP runs inside SSH. FTPS is FTP with TLS. They use different ports, different prompts, and different server software. FileZilla can do both, but not in one site entry.

The host said port 22 and FTP. What should I select?

Ask them to name the protocol. Port 22 is the SSH default, which fits SFTP. Plain FTP on port 22 is unusual. Selecting FTP and typing 22 often produces a connection error rather than a secure session.

Can FileZilla create the SSH key for me?

The client can use a private key you already have. Creating the key pair and installing the public key on the server is an account task. Your host or your own server administrator has to authorize that public key.

Related tutorials

Sources checked for this guide

Labels in FileZilla can move between releases. If a menu name in your copy differs, follow the message log and the closest matching command rather than forcing an older click path.