Tutorials UPDATED: 28 April 2023

Transferring files: the difference between FTP and SFTP

Yorgos Fountis

3 min read
Image for Transferring files: the difference between FTP and SFTP

The concept of file transferring in computer networks is probably as old as email itself,  if not older. There are many ways and protocols used for file transferring and as technologies have evolved over the years, so has the process of file transferring. One file transfer protocol, which became a standard, is FTP (File Transfer Protocol). FTP  is a protocol for transferring files via a network (typically a TCP/IP one, like the Internet). Its original protocol specification dates as back as the 1970’s.

What it is and how it works

FTP is a traditional client-server application. Users connect to an FTP server (using its IP or name) via a client. FTP uses two connections.  One for sending and receiving commands (port 21) while the other one for data transferring (port 20). Connected clients can issue standard directory navigation commands, such as list or cd or get and put, to download or upload a file on the FTP server.  In graphical FTP clients, the process of navigating the files and directories, is similar to that of a local file browser. Uploading and download files with get and put is a matter of a simple drag’n’drop. User authentication is done via username and password or via an anonymous guest account which grants the user access to the public list and the downloading of files. FTP sites are usually named as ftp.domain.com

Secure FTP and why it is better

SFTP (Secure File Transfer Protocol) is part of the SSH software suite and provides secure file transfer. It is also, a client-server application like FTP, but with the following significant enhancements:

Encrypted communication

Contrary to FTP, SFTP provides secure file transfer by using SSH’s (Secure Shell) PKI security mechanism. It uses a known-hosts file to determine the server’s authenticity. The very first time you connect to a server, the server sends its public key to the client. Users can either login without providing a password (by configuring the private/public keys) or by using a username and a password.

Interrupted transfers can be resumed

One of the main pains of FTP was that it did not support resumed downloads. Whenever a file transfer would break, the user would have to initiate the downloading process from the very beginning. SFTP clients can detect partial downloads and resume them if the user requests to download the same file again.

Mass file downloads

SFTP supports wildcards when referring to files being downloaded through the mget command.

Try our Award-Winning WordPress Hosting today!

Advanced file operations

SFTP feels more like a shell than an FTP client. It supports remotely changing permissions, taking ownership of files and directories, as well as creation and deletion of those.

WinSCP is the most popular SFTP/SCP file transfer software for Windows. On Mac OSX and Linux, you can use the sftp program from your command line.

Using SFTP in Pressidium

Every Pressidium website has a unique SFTP address. You can access your website via SFTP and browse and download your website’s files or upload new ones. If you would like to know how to use SFTP with your Pressidium website, please read the instructions in this Support article

Closing

In the near future, we will be exploring the developer’s environment and how to properly set it up for Pressidium. We will be using a lot of SFTP in a hands-on way to integrate a github repository, using a service called DeployBot. We will be delving into more technical topics shortly, geared mostly, but not only, for developers. But before we get into all of that, we have a Christmas Special coming up!

Start Your 14 Day Free Trial

Try our award winning WordPress Hosting!

START YOUR FREE TRIAL VIEW OUR PRICE PLANS

OUR READERS ALSO VIEWED:

Build a WordPress OOP Plugin: An Object-Oriented Programming tutorial

Follows us on a step-by-step tutorial on how to create a custom WordPress plugin using Object Oriented Programming (OOP).
Tassos Antoniou
Tassos Antoniou
27 min read

Render Blocking: What it is, Why it Matters, and How to Fix it on Your Website

Render blocking can significantly slow down your website loading time. Find out what it is and how to fix it in this article!
Tassos Antoniou
Tassos Antoniou
8 min read

SQL Injections And WordPress

Take a look at some real-world examples of SQL injection attacks & find out what you can do to protect your website from them in this article!
Tassos Antoniou
Tassos Antoniou
9 min read

WordPress Render Blocking

Render blocking can slow down the time it takes for your website to load. Let's look at some WordPress specific render blocking issues.
Tassos Antoniou
Tassos Antoniou
5 min read
SUBSCRIBE