How to connect to an SFTP server

Posted on Jan 8, 2021 • Updated on Oct 15, 2025

SFTP is one of the most common methods of transferring files securely, with literally millions of devices having support for the SFTP protocol. SFTP is often used by insurance, finance, health, and technology companies to securely receive files from clients at scale.

When using the protocol, the most frequently used way of transferring files involves SFTP servers. In this guide, we'll explain how to connect to an SFTP server and what steps to take so you can transfer files to and from a remote server. 

 

What are SFTP servers? 

An SFTP server is a server that enables secure file transfer, remote file access, and file management over a network. They are a secure, convenient way to transfer files, but they can be confusing to work with if you've never dealt with them.

A lot goes on behind the scenes, but a simple way to think of an SFTP server is that it's a computer that provides a simple, secure, and reliable way to upload or download files from a remote machine. 

For more details on SFTP servers and how they work, see What is an SFTP server? 

 

What you need to connect to an SFTP server

All SFTP servers require a few things to connect: 

  • Server hostname
  • Port number
  • SFTP server username
  • Authentication method

The most common way to connect using these details is through an SFTP client, which we'll use as our example here. 

Server hostname

The first step of connecting to an SFTP server is knowing the server hostname. This identifies the specific server that you want to connect to. The host name can be a numeric IP address or DNS name (e.g. example.com), which is more common for modern SFTP servers. 

Besides being sent the hostname, there's no easy way to get the hostname as it can be any IP address/domain name. If you're already connected, this is easier, but the most direct and straightforward way is to simply have it given to you. 

SFTP Port number

An SFTP port is an endpoint for transmitting communications and data using the SFTP protocol. Because each computer has thousands of different ports, you need to connect to the correct one to establish a connection. 

With most SFTP servers, this isn't a major issue because port number 22 is used by default. Unless there's a pressing need to change this for security purposes, the default port will be used by most servers.

If you haven't been given a port and are asked to add a port number, try 22 first. 

For more information on SFTP ports and how they work, see our article on SFTP ports

Username

To connect to an SFTP server, you need to have a valid username, just like with signing in to any account. This stops unauthorized people from accessing the server.

A server admin will need to make a username for you if you don't already have one. When creating a username, they can grant specific permissions like read-only, write-only, or read/write access. Some servers allow for more granular controls like being able to upload but not delete files or limiting a user to specific folders or actions. Permissions are important because they determine what the user can do once they connect to the server. 

While some servers will provide a "public" shared username with limited permissions like download only, this is generally not advised for security purposes and each user accessing the server should have a unique username when possible. 

Whether it's a public or personal username, a server admin will need to create and provide you with that username in order for you to connect. 

Authentication method 

Along with the username, the user will also need to have an authentication method to prove their identity. The most common SFTP authentication method is by using a password. When trying to log in to the server, the server will prompt for the username and password combination that must match an existing account in order to establish the connection. 

Passwords aren't the only method to connect to SFTP servers, however. Users can also connect using an SSH key, which can both streamline the login process and add an additional layer of security. SSH keys are a secure method of authenticating with systems and servers that use the Secure Shell protocol, which includes SFTP.

RSA keys are the most commonly used format with SFTP, which include a public key that is shared with the server and a private key that should never be shared and stays stored on your own machine. A simplified way of how this works is that an SFTP server admin will add the public key to the server, then when you log in, you include your private key in the process, which you upload from your machine. If the key pairs match, the connection is authorized. 

Some servers require including an SSH key to be allowed to connect. Usually, these servers will have files that require more security like HIPAA files, but any SFTP server can include this as a requirement if they want to. 

For more information on SSH keys, see our article on SSH keys for SFTP.

 

How to connect to an SFTP server

Once you have all the required components, you're ready to connect to the SFTP server. There are several methods to do this, including a command line interface, but for this guide, we'll stick to the most common method, connecting with a dedicated SFTP client. 

An SFTP client is software that allows you to interact with an SFTP server. Many of these clients simplify the connection process with graphical interfaces and guide you through how to connect. You can compare different clients in our article about the best SFTP Clients for business

The specific fields and steps will vary depending on the client you choose, but all of them will have similar requirements and follow the same general flow. 

Using an SFTP client to connect to an SFTP server

To connect to the SFTP server, start by opening up the client. You should be prompted to choose a connection type. If not, search for an option like "Open Connection". Some clients have basic connection fields stickied near the top of the interface so you can find them from any screen. 

On the connection screen, you'll be asked for the server details. Here is where you'll include the components in the requirements section above. 

  • The hostname will be entered into a hostname field or a field with a label like "server" or "URL". 
  • Specifying the SFTP Port will be done in a "Port" field or similar. Many clients include the default Port 22, but you can override this if the server is using a different port. 
  • Username will have its own field, and Password should as well.
  • If SSH keys are required, the specific way to add the keys varies by client, but is often included on the SFTP connection screen. If the option isn't obvious to find, we recommend checking the help docs for the client to see how to add keys. 
  • When you've included the required fields, you should be able to connect with a "Connect" button or similar.

Establishing the SFTP connection

Once you've entered all the details, the server will then check the details and authorize you to connect if they are correct.

Usually, the first time you connect, the client will show you a message about the SFTP server's fingerprint. This is a way to make sure you're connected to the right server. In most cases, with a valid username and password, you are very likely to be connected to the right server, but if you're concerned, you can make sure by comparing this fingerprint to the server's public key, which you can request from the provider.

After establishing the first successful connection, most clients will let you save your choice so you don't get the message again. 

Once connected, you'll be able to interact with the server with the permissions your user has. As mentioned previously, these permissions can include viewing files, downloading, uploading, and/or deleting, all of which you should be able to do directly from the SFTP client. 

 

Using Couchdrop for connecting to SFTP servers

Couchdrop is a cloud SFTP server that deploys instantly with no infrastructure, but it can also work as an SFTP client, and you can use the modern interface to connect to other SFTP servers. Find out more about using Couchdrop as an SFTP client or get instant access with a 14-day trial with no credit card required by registering for an account