How to Use SFTP to Transfer Files

One of the oldest methods for transferring files from your computer to your server is called FTP (file transfer protocol). Unfortunately, this method is not secure, and if you need to transfer sensitive data and also protect your username and password, you should use a method that provides better security. SFTP is one option.

Most modern FTP clients can also use secure FTP by logging you into your server using your SSH username and password. In this example, we will use the free and open source FTP client called FileZilla, since it is available for Windows, Mac OS X, and Linux.

You can download FileZilla from the project’s website and then follow these instructions:

  1. Click the button on the far left to open the “Site Manager”
  2. Click the “New Site” button
  3. For “host” enter your domain name (without http) or IP address
  4. In the port box, enter your server’s port (if different from the default SSH port 22)
  5. For “Protocol”, select “SFTP – SSH File Transfer Protocol”
  6. For login type, you can leave it as “Normal” unless you have specific circumstances
  7. Type your username and password
  8. Click “Connect”

If you have never connected to the server via SSH from that computer, you will be asked if you want to add it to your trusted hosts. Once you have done that, you should be able to connect whenever you need to transfer files.