How To Use SFTP to Securely Transfer Files with a Remote Server
One of the aspects of running a website that you won’t hear about too often, is how much you’ll need to access your server. It’s a common task, and in some cases may be a day-to-day routine one. In most cases, Secure File Transfer Protocol (SFTP) is how you do it. However, you’ll have to learn how to use SFTP before you can poke around in your server and transfer files.
The process itself seems like a scary proposition – i.e. working direct with your website’s files – but it’s straightforward. Most routine applications require you to log in, transfer files as you would on your computer, and log out. If you can move a folder from one place to another on your desktop, you can also do this.
Over the next few minutes, we’re going to show you how to use SFTP to transfer files. Before this, let’s talk about what SFTP is, and why you need to use it.
What FTP and SFTP Is
File Transfer Protocol (FTP) does what it says on the tin. It’s a protocol to help you move files and folders from one location (often your local machine) and send them across the internet to another machine (your server).
While the underlying technology isn’t necessary to understand here, what is worth knowing is how this process works. It involves connecting to a remote server from a local one. You’ll log into the server using specific credentials, work with the files, and log out again.
As for SFTP, this offers greater security and encryption for the connection you make. For example, the username and password you type in will use encryption, as will the files themselves. The consequences of this are something we’ll talk about next.
Why Secure File Transfer Is the Ideal Approach to Take
For most aspects of using the internet (and this goes for life too), safer is better. When it comes to SFTP, it offers all users a high level of protection from malicious intent. SFTP builds on older protocol formats where a user would have encryption, but the transferred files didn’t.
Now, we have a system where you establish only one connection, and ‘host keys’ help to authenticate the connection at both ends. This means all of the files and data push through the encrypted ‘tunnel’, safe from the clutches of hackers and other users.
On the whole, it’s esepcially important to use an encrypted connection, as watching your credentials, files, and folders for your site fall into the wrong hands spells disaster.
3 Leading SFTP Clients to Help You Transfer Files
You could use a Command Line Interace (CLI) to work with SFTP, but it’s not necessary. A better approach is to use a dedicated SFTP client. This provides a Graphical User Interface (GUI) to help you navigate your local machine and server.
While there are lots of SFTP clients available, you’ll see the following three mentioned a lot. This is because they deliver the goods time and again when accessing the files on your site’s server. Here are the three we’ll look at:
- FileZilla. This is an often-recommended SFTP client that’s open-source, cross-platform, and a breeze to use.
- Cyberduck. You’ll find that Cyberduck is just as popular as FileZilla. Although the workflow within the app is different, you can achieve the same results.
- Transmit. The developers of Transmit, Panic, also author the Nova code editor (among others). The company have a good reputation, and this premium SFTP client is a top-drawer solution.
After this, we’ll quickly look at what options your hosting provider will offer you to transfer files.
1. FileZilla
If you browse the WordPress.org support pages, you’ll find a few words on FileZilla. This is because it’s an open-source client that works for Windows, macOS, and Linux. What’s more, it has an intuitive layout and powerful functionality:
It uses a number of window panes to display your machines, and offers a status bar to show you what is happening with the transfer process:
FileZilla can provide FTP, SFTP, and other connections, and comes with robust management tools to help you access many different connections at once.
2. Cyberduck
Next up, you don’t hear of Cyberduck as much as other SFTP clients, but it’s one of our favorites. It works in a different way to FileZilla, but is still intuitive and a breeze to use:
While there is no Linux version of Cyberduck, Windows and macOS users have dedicated apps. You access every element you need from one pane, and the big selling point is Cyberduck’s flexibility.
You can connect to a wealth of services and servers, such as Amazon S3, Google Drive, Dropbox, and more. Despite the huge potential under the hood, Cyberduck remains a simple-to-use SFTP client.
3. Transmit
If you want to opt for a premium SFTP client, and there are lots of reasons to do so, Panic’s Transmit is the best option around in our opinion.
It’s a quirky client – much like the developer – and looks gorgeous. However, it’s only available for macOS. Though, for $45, you get an app that looks native and has a whole host of fantastic functionality.
In fact, you can see similarities between Cyberduck and Transmit in the way they operate and the servers each one supports. If you’re on a Mac and you want great integration for your SFTP client, Transmit could be ideal.
A Quick Note on Your Hosting Provider’s File Transfer Tool
Before we move on, most hosting providers offer a dedicated file transfer tool, regardless of whether they use a custom dashboard or a solution such as cPanel. You might wonder why you’d want to use a dedicated SFTP client over the built-in options your host provides.
In our experience, an SFTP client will give you a good measure of flexibility straight from your computer. You can open the app and be into your server within a minute or so. Compare this to a host’s file transfer tool, where you’ll need to log into your host and navigate to the right options pages before you log into the server.
What’s more, you can also do much more with an SFTP client than log into your server. For example, you can access your Google Drive documents, work with your Dropbox files, and much more.
How To Use SFTP to Securely Transfer Files with a Remote Server
We’re confident that any site owner can learn how to use SFTP. This is because the process itself is much like working with files on your computer. This is especially true when you consider the above clients.
There are three simple steps you’ll need to follow in order to transfer files using SFTP:
- Grab your login credentials and access your server.
- Get to grips with the layout of your app.
- Transfer your files using the SFTP client.
This is all there is to it! We’ll begin with finding your SFTP log in credentials.
1. Obtain Your Server’s SFTP Login Credentials and Log In
The first step doesn’t involve your SFTP client at all. Before you log into your server, you’ll need to find your credentials. Lots of times, they will be in your hosting control panel. However, this location might be different depending on your choice of host.
Regardless, you’ll want to look for a section dedicated to “SFTP credentials”, “File Management”, or something similar sounding.
You’ll know you have the right login details when you find mentions of protocols and ports. This will make sense when you log in.
Once you have the credentials in hand, you can open your SFTP client. For this tutorial, we’re using Cyberduck. However, most of the following will translate to other clients (and we’ll note where there’s a big difference).
When the client is open, look to find out where you log in. For FileZilla, this is at the top of the GUI:
For Cyberduck, you’ll need to head to the File > New Browser option in the top toolbar, then click the Plus icon to open a new login screen:
Once you confirm using the relevant button, the client will connect to the server and you’ll want to look over the interface in greater detail.
2. Familiarize Yourself With the Client and Server Layout
When you first open your SFTP client, it will look bare. This is because there’s no connection, and hence no files. However, once you log in, the screens will populate with whatever the server contains. In the case of Cyberduck, this will be a one-panel screen that shows only your server’s files:
For FileZilla, there will be four quadrants. The left-hand side deals with your local machine – the upper-left is the tree directory, and the lower-left is the individual files and folders within. The right-hand side is the same, but for your sever:
In a nutshell, this is all you need to know about how to read the GUI for your SFTP client. There are other features and functionality you’ll want to look into, but they’re beyond the scope of this article. Navigating around around your server using SFTP follows the same conventions as your computer’s file system, so all you need to do from here is transfer the files.
3. Move Your Files From One Server to Another
This step swill be the most straightforward of them all. Both FileZilla and Cyberduck let you drag and drop files and folder between servers. The only difference is the in the GUI. For example, Cyberduck uses a one-panel system, so the expectation is that you have a File Explorer or Finder window open at the same time.
For FileZilla, you can view everything within the GUI, so it’s easier to understand the relationship between the local machine and site server.
Regardless of your SFTP client, you’ll drag files and folder between machines and look at a status display to check on the progress of your transfer:
These actions will represent about 80 percent of what you’ll use SFTP for. AS you can see, it’s a doddle, which means you’ll be able to handle most of your SFTP needs without friction!
In Summary
Transferring files between servers is a routine and common task for every website owner. However, once you learn how to use SFTP, you’ll be able to do so in a fast and secure way. As such, you’ll spend less time in your server, and can concentrate on other aspects of your site.
Once you choose a suitable SFTP client – and a free open-source solution such as Cyberduck or FileZilla is ideal – you can log into your site’s server. From there, the GUI will be simple to use. The process will be similar to how you would move files around on your computer. When you complete the work, you can log out again and go back to running your site.
Do you use SFTP to access your server, or do you have another method to share? Let us know your thoughts in the comments section below!
Leave a Reply