In actual project development, the most commonly used file transfer methods are FTP and SFTP, but what are the characteristics of these two transmission methods? This article will discuss the differences between SFTP and FTP. 1. FTP protocol FTP is one of the protocols in the TCP/IP protocol suite. The TP protocol consists of two parts:
By default, the FTP protocol uses TCP ports 20 and 21. Port 21 is used to transmit control information, and whether to use port 20 as the data transmission port depends on the transmission mode used by FTP. If the passive mode is used, the specific port to be used is determined by negotiation between the server and the client. There are two FTP transmission modes:
1. Active mode The FTP client first establishes a connection with the TCP port 21 of the FTP server and sends commands through this channel. When the client needs to receive data, it sends the PORT command on this channel. The PORT command contains the port that the client uses to receive data. When transmitting data, the server connects to the client's specified port through its own TCP port 20 to send data. 2. Passive mode The establishment of control channel is similar to active mode, but after the connection is established, the Pasv command is used. After receiving the Pasv command, the FTP server randomly opens a high-end port (port number greater than 1024) and notifies the client of the request to transmit data on this port. The client connects to this port of the FTP server, establishes a channel through three-way handshake, and then the FTP server transmits data through this port. Note: Many firewalls are not allowed to accept connections initiated from the outside when they are set up, so many FTP servers located behind firewalls or in intranets do not support PASV mode, because the client cannot pass through the firewall to open the high-end port of the FTP server; and many intranet clients cannot log in to the FTP server in PORT mode, because TCP 20 from the server cannot establish a new connection with the client in the internal network, causing it to fail to work. 2. SFTP protocol
SFTP is the abbreviation of SSH File Transfer Protocol, a secure file transfer protocol. SFTP and FTP have almost the same syntax and functions. SFTP is a part of SSH and is a secure way to transfer files to the Blogger server. In fact, the SSH software package already includes a secure file information transfer subsystem called SFTP. SFTP itself does not have a separate daemon process. It must use the sshd daemon process (the default port number is 22) to complete the corresponding connection and response operations. So in a sense, SFTP is not like a server program, but more like a client program. 3. The main differences between the two
|
<<: In-depth analysis of the seven major communication protocols of IOT
>>: Kunpeng gathers data, shines in the Central Plains, and promotes the digital economy
DMIT.io has launched a NEW YEAR promotion for 202...
Tribe has shared information about DiyVM many tim...
Organizations need strong SLAs to meet their UCaa...
[[276674]] TCP (Transmission Control Protocol) an...
1. Common scenario 1 - restaurant/hotel 1. Backgr...
UUUVPS (SanYou Cloud) is a registered Hong Kong c...
When we are doing network development, we often h...
As the extraordinary year of 2020 draws to a clos...
Since 2000, my country's automobile industry ...
Hello everyone, I am Xiao Fu. Illustrated network...
1. Introduction to network model In computer netw...
On November 25, 2019, the RIPE NCC, which is resp...
Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN ...
Here is some information about Turkey VPS. The Ba...
Every load balancer is a reverse proxy, but not e...