In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "what is the difference between FTP and sftp in linux". Xiaobian shows you the operation process through actual cases. The operation method is simple and fast and practical. I hope this article "what is the difference between FTP and sftp in linux" can help you solve the problem.
Difference: 1, the link mode is different, FTP uses TCP port 21 "control connection" to establish a connection, while SFTP establishes a connection through SSH protocol (TCP port 22);2, SFTP uses encryption and decryption technology to transmit data, security is higher than FTP;3, SFTP transmission efficiency is lower than FTP.
This tutorial operates on Linux 5.9.8 and Dell G3 computers.
The most commonly used file transfer methods in linux actual project development are ftp and sftp, but what are the characteristics of these two transfer methods? This article will discuss the differences between SFTP and FTP.
FTP Protocol
FTP is one of the protocols in the TCP/IP protocol suite. TP protocol consists of two parts:
FTP server (used to store files)
FTP client (users can use FTP client to access resources located on FTP server through FTP protocol)
By default, FTP uses TCP ports 20 and 21. Port 21 is used to transmit control information, and whether to use port 20 as a port for transmitting data is related to the transmission mode used by FTP. If passive mode is adopted, which port to use is decided by negotiation between the server and the client. FTP transfer modes are divided into the following two types:
Active mode (Port)
Passive mode (Passive)
1. Active mode
FTP client first and FTP server TCP port 21 to establish a connection, through this channel to send commands, the client needs to receive data when the PORT command sent on this channel. The PORT command contains the port on which the client receives data. When transmitting data, the server connects to the client's designated port through its own TCP 20 port to send data.
2. Passive mode
The control channel is similar to the active mode, but the Pasv command is used after the connection is established. 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 the FTP server on this port and establishes a channel through a three-way handshake. Then the FTP server will transmit data through this port.
Note: Many firewalls are not configured to accept externally initiated connections, so many FTP servers located behind the firewall or on the intranet do not support PASV mode, because the client cannot open the FTP server's high-end port through the firewall; and many intranet clients cannot log on to the FTP server in PORT mode, because TCP 20 from the server cannot establish a new connection with the client of the internal network, resulting in failure to work.
SFTP protocol
SFTP stands for SSH File Transfer Protocol. SFTP has almost the same syntax and functionality as FTP. SFTP is part of SSH and is a secure way to transfer files to Blogger servers. In fact, in SSH software package, has included a security file information transfer subsystem called SFTP, SFTP itself does not have a separate daemon, it must use the sshd daemon (port number default is 22) to complete the corresponding connection and reply operations, so in a sense, SFTP is not like a server program, but more like a client program.
The main difference between SFTP and FTP
FTP uses a control connection on TCP port 21 to establish a connection. SFTP, on the other hand, is a secure connection established between client and server over SSH protocol (TCP port 22) to transfer files.
Security: SFTP uses encryption to transfer authentication information and data, so SFTP is very secure compared to FTP.
Efficiency: SFTP uses encryption and decryption technology, so the transmission efficiency is much lower than ordinary FTP.
About "linux FTP and sftp what are the differences" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the industry information channel. Xiaobian will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.