SSH and SFTP are used together in relation to file transfer protocols and the security involved within. Is SSH the same as SFTP?
Definition of SSH and SFTP
- SSH – This is a transport layer referred to as Secure Shell which is used to secure information and logins required for data to move between two devices. It uses a combination of symmetric cryptology and asymmetric security keys to provide optimal performance and strong encryption.
- SFTP – This is a file transfer protocol that is based on SSH and is utilized to facilitate secure transfer of files and other forms of data between devices. It is popular because it can be conveniently used to transfer large amounts of data over the internet in a channel that is secure and reliable.
Why would they be compared?
There are a couple of basis in which the two are compared:
- FTP over SSH – FTP is abbreviated to mean File Transfer Protocol and is a network that allows the transfer of data and files over the internet using UDP ports 20 and 21. FTP over SSH is a hybrid of FTP that involves running the FTP network over a secure shell one in order to add a layer of security for the data being transferred
- SFTP – As mentioned above, SFTP is based on SSH. For this reason, it is commonly misrepresented as FTP over SSH. It is notable that SFTP is not related to FTP in any way, other than their similar primary use.
SSH and SFTP are related but are not the same. SFTP is a file transfer protocol based on SSH protocols and bears no direct connection to FTP. SSH can exist independently of SFTP but SFTP cannot function without an active SSH connection.
What port does SFTP use?
SFTP runs on top of Secure Shell hence uses port number 22 to facilitate communication with the internet. However, it can be configured to allow it to listen on a different port in line with the SSH requirements and the user’s resources.