FTP and FTP Port, SFTP and SFTP Port: Quick Reference

-

|

Introduction

FTP and SFTP are two protocols for transferring files between a server and a client computer. FTP port is 21 while SFTP port is 22. SFTP communicates via encrypted connection, while FTP uses plain-text (unsecured) communication.

This quick reference guide covers FTP and SFTP, how they work and the differences between them.

What is FTP & FTP Port Number?

FTP (File Transfer Protocol) is a client-server communication protocol used to transfer files between a client and a server. FTP port is 21.

File Transfer Protocol (FTP) Clint-Server Model and Authentication

For FTP communication to occur there has to be a server and a client.

FTP requires that clients authenticate with the server when they attempt to connect. Authentication is via clear-text, meaning the communication between the FTP client and FTP server is not encrypted.

This makes FTP communication insecure. Meaning that an intruder with access to the communication will be able to see user names, password and files transferred.

FTP connection can be Active or Passive. This determines how a data connection is established between the client and the server. In both connection types, the client creates a TCP (Transmission Control Protocol) connection to the server via FTP port 21.

In active FTP mode, the connection begins by the client listening for incoming data connections from a random port, FTP port M. The client then sends FTP command PORT to let the server know which FTP port it is listening on. Next, in the communication process the server initiates a data channel to the client from its port 20, the FTP server data port.

There are circumstances where the client is behind a firewall. A client behind a firewall may not be able to accept incoming TCP connections. In this circumstance, FTP Passive mode is used for the connection.

In Passive FTP mode, the client uses the control connection to send a PASV FTP command to the server. The client then receives an IP address and server port number from the server. Finally, the client uses the information received from the server to open a data connection from an arbitrary client FTP port to the IP address and port received.

FTP Port Numbers Explained

As described above, FTP uses two TCP connections for communication, FTP port 20 and 21. FTP port 21 is used to send control information from the server to the client. Port 21 is not used to send data files. The second FTP port, 20 is used to send data files between the server and the client.

What is SFTP & SFTP Port Number?

SFTP (SSH (or Secure) File Transfer Protocol) allows for file and data transfer over a connection secured using the SSH (Secure Shell) protocol. Unlike FTP in SFTP, communication between a client and a server is encrypted over SFTP port is 22.

Secure FTP (SFTP) Clint-Server Model and Authentication

Like FTP, SFTP communication occur between a client and a server. SFTP server requires a web server with the correct port (SFTP port 22 or any other port you choose to use).

The port must be forwarded to the FTP server from the firewall. Once you correctly install an SFTP server, an SSH Host key is generated. Users can then be created and assigned the necessary permissions that will allow them connect to the SFTP server.

To connect to a SFTP server, you require an SFTP Client. An SFTP Client could be a GUI or command line tool. The SFTP client authenticates and transfers files over a secure and encrypted connection to the SFTP server via SFTP port 22 (or the port specified in the SFTP server).

Differences Between FTP and SFTP

Apart from the TCP ports that FTP and SFTP use for connection, there are other differences between the two protocols.

The table below highlights the differences between the two protocols.

S/NFeatureFTPSFTP
1PortFTP runs on Port 21 and 20 SFTP uses port 22
2Data TransmissionUses two separate channels to send control information and transfer data.SFTP combines control and data into secure packets and send them through a single channel.
3SecurityFTP communication is not encrypted. Meaning a third party could intercept the data.On the other hand, SFTP is data is sent via encrypted connections. If an intruder intercepts the data, it will be meaningless to the hacker.
4FirewallFTP is not firewall friendly. SFTP uses a single SFTP Port 22 for both inbound and outbound connections. This means that a single port can be opened in the firewall for SFTP communications.

Conclusion

In this quick reference guide, I covered FTP, SFTP, FTP port and SFTP port. FTP runs on port 20 and 21 while SFTP port is 22.

If you have any question or comment use the “Leave a reply” form at the end of this guide. You could also share your experience so other readers can benefit from it.

Other Helpful Guides

Additional Resources and References

LEAVE A REPLY

Please enter your comment!
Please enter your name here

FEATURED POSTS

How to Share a Folder in Windows 10 (3 Methods)

Introduction This guide demos how to share folder in windows 10. It covers 3 methods. Options...

How to Map Network Drive in Windows 10 (5 Methods)

Introduction This guide demos 5 methods to Map Network Drive in Windows 10. Options to...
How to Install Windows 10 1909 Preview Build

How to Install Windows 10 19H2 Preview Build

Introduction If you are a member of Windows 10 Insider Program you can install Windows 10 19H2 Preview Build....

How to Sign in to Windows 10 with a Microsoft Account

Introduction When you installed Windows 10 you may have created and signed in with a local account. You can...
Disable IPv6 in Windows 10

How to Disable IPv6 in Windows 10 (3 Methods)

Introduction This guide demos 3 methods to disable IPv6 in Windows 10: Disable IPv6 from...

Advertisement

TRENDING POSTS

Remote Desktop Connection

Remote Desktop Connection an Internal Error Has Occurred [Fixed]

Introduction I recently received the error message "Remote Desktop Connection an Internal Error Has Occurred". It was strange because...

Find My Samsung: Register and Use Samsung Find my Mobile

Introduction Ever wondered how you could find your Samsung phone if you lost it? Find my Samsung or Samsung...
What is the Difference Between PowerShell and CMD?

Windows Powershell vs CMD: Differences and Similarities

Introduction This short guide compares Windows PowerShell vs CMD (Windows command prompt). I will cover the history and nature...
Spotify No Longer Supports this Version of Microsoft Edge

Spotify No Longer Supports this Version of Microsoft Edge [Fixed]

Introduction When you open Spotify web player on Microsoft Edge, you may receive the error message "Spotify No Longer...
Windows 10 Won't Boot

Windows 10 Won’t Boot With Black Screen? 3 Ways to Fix It

Why Won't Windows 10 Boot Up? If your Windows 10 stops with a black screen, the first question in...

Advertisement

BEST OF ITECHGUIDES

Chrome ADMX

How to Download and Install Google Chrome Administrative Template

Introduction To configure Google Chrome settings via Group Policy you require Chrome ADMX. However, as you would expect by...
windows server 2016 recovery mode

2 Ways to Boot Windows Server 2016 to Recovery Mode

Introduction You can boot Windows Server 2016 Recovery Mode in two ways: Without installation media...
spotify no longer supports this version of chrome

How to Fix “Spotify no Longer Supports this Version of Chrome”

Introduction Have you been frustrated by "Spotify no Longer Supports this Version of Chrome" error? You are not alone!...

Spotify Web Player: Your Definitive Guide

What is Spotify Web Player? Spotify Web Player is a browser-based player that allows you to stream Spotify via...
windows 10 lock screen timeout

How to Change Screen Time Out Setting in Windows 10

Introduction There are two easy ways to change Windows 10 lock screen timeout settings: Desktop...

RECENT POSTS

How to Enable Hyper-V in Windows 10 (3 Methods)

How to Enable Hyper-V in Windows 10 (3 Methods)

Introduction This guide demos 3 methods to enable Hyper-V in Windows 10. To install Hyper-V...
RSAT Tools in Windows 10 Explained: Plus How to Install RSAT

RSAT Tools in Windows 10 Explained: Plus How to Install RSAT

Introduction Starting from October 2018 (1809) update, RSAT Tools became part of Windows 10. From this version of Windows...

How to Enable RSAT for Active Directory in Windows 10 (3 Methods)

Introduction This guide demos 3 methods to enable Active Directory in Windows 10. It is not exactly enabling "Active...
How to Install Windows 10 1909 Preview Build

How to Install Windows 10 1909 (19H2) Preview Build

Introduction Windows 10 1909 Preview is available for Windows Insiders. Made available early September, 2019 you have to be...
How to Install RSAT in Windows 10 (3 Methods)

How to Install RSAT in Windows 10 (3 Methods)

Introduction This guide demos how to Install RSAT in Windows 10. Starting with Windows 10...

How to Share a Folder in Windows 10 (3 Methods)

Introduction This guide demos how to share folder in windows 10. It covers 3 methods. Options...
Configure Map Network Drive with Group Policy

Map Network Drive in Windows 10 with Group Policy

Introduction This guide demos how to map network drive with group policy. This guide is...

How to Map Network Drive in Windows 10 (5 Methods)

Introduction This guide demos 5 methods to Map Network Drive in Windows 10. Options to...
How to Download Windows 10 ISO with Media Creation Tool

How to Download Windows 10 ISO with Media Creation Tool

Introduction This guide demos the steps to download Windows 10 ISO. You can download Windows 10 ISO with Media...

How to Install Windows 10 from Network Boot (Via WDS Server)

Introduction This guide demos how to install Windows 10 from network boot. The steps discussed in...

Advertisement

MUST READ

roll back windows 10 update

How to Roll Back Windows 10 Update (3 Methods)

Introduction There could be a number of reasons you may want to roll back windows 10 update. One common...
bootrec /fixboot access is denied

How to Fix BootRec /FixBoot Access is Denied Error in Windows 10

Introduction BootRec /FixBoot Access is Denied Error in Windows 10? This error is likely caused by corrupt EFI directory.
GPResult Command

GPRESULT Command: Syntax, Parameters, Examples

What is GPRESULT? GPRESULT is a command line tool that displays the Resultant Set of Policy (RSoP) information for...
Spotify No Longer Supports this Version of Microsoft Edge

Spotify No Longer Supports this Version of Microsoft Edge [Fixed]

Introduction When you open Spotify web player on Microsoft Edge, you may receive the error message "Spotify No Longer...
disconnect Spotify from Facebook

How to Disconnect Spotify from Facebook

Want to disconnect spotify from Facebook? Maybe you prefer to sign in to Spotify with your email or simply want to separate...

By using this website you agree to accept our Privacy Policy and Terms & Conditions