为了使计算机网络能够交换数据和资源,它需要各种设备的集合,例如路由器、交换机和计算机。然后,该网络将需要遵循一个协议,可能是多个协议,以在所有这些设备之间建立适当的通信。FTP和SFTP就是两个这样的协议。
什么是SFTP和FTP?FTP提供了一种通过网络交换文件(exchanging files over the network)的方式,而SFTP允许跨数据流安全访问、传输和管理文件。FTP是数据以纯文本形式发送,而SFTP加密所有数据以发送出去。
FTP和SFTP之间的主要区别在于安全性。FTP不提供在多个设备之间传输文件的安全通道,而SFTP提供。因此,SFTP比FTP更安全。但是,本文将深入探讨这两种协议之间的差异。
HDG 解释:什么是 SFTP 和 FTP?(HDG Explains: What Is SFTP & FTP?)
要了解SFTP(SFTP)和FTP之间的区别,您首先必须更好地了解它们的用途和用途。它们之间的用途仅略有不同,但差异比乍一看要深一些。
什么是 FTP?
FTP(F)或文件传输协议(T)是一种标准网络协议,它允许文件在客户端(本地计算机)和服务器之间通过网络传输 。(P)
在具有图形用户界面 ( (Prior)GUI(GUIs) )的操作系统之前, FTP被开发用于在较旧的基于文本的计算机和网络之间发送和接收文件。在超(t)文本传输协议( (T)HTTP(H) ) 出现 之前(P),它是用于访问 Internet 上信息的原始程序之一。
今天,使用FTP(FTP)的主要方式有三种:图形FTP 客户端(FTP Clients)、Web 浏览器(Web Browser)和命令行 FTP(Command-line FTP)。每个都适用于各种应用程序,包括台式机、服务器、移动设备和硬件平台。
图形 FTP 客户端
这些客户端允许以拖放格式传输文件。Filezilla可能是(Filezilla)Windows操作系统上最著名的免费FTP客户端。对于Mac,有Cyberduck。
通常,在打开程序时,您将输入FTP主机、您的用户名和密码。有些服务器可能会设置它,以便您可以匿名输入,在这种情况下,可能不需要用户名和密码。
然后,您可以将文件和文件夹从主机拖放到服务器(反之亦然),然后等待传输完成。
网页浏览器
使用 Web 浏览器连接到FTP服务器可能会更熟悉,因为您可以像连接HTTP地址一样连接到FTP地址。Web 浏览器还可以轻松浏览更大的目录、读取文件和检索它们。它还将为您提供自动处理一些站点连接详细信息和文件传输的服务。
尽管网络浏览器FTP看起来很方便,但它通常比专用FTP客户端更慢且更不可靠。它们也往往具有较少的功能。
命令行 FTP
您可能不知道,但您的操作系统可能具有内置的命令行客户端。只要您的操作系统是Windows、Mac或Linux。打开操作系统的提示符(Windows的命令提示符、Mac的(Mac)终端或(Terminal)Linux的控制台)开始。
然后,例如,输入
f tp ftp.empire.gov
现在按Enter。然后,如果您要访问自己的帐户,请使用该帐户的用户名和密码。如果匿名访问,请使用匿名(anonymous)作为您的用户名和您的电子邮件地址作为密码。
此时,您需要位于存储要移动的文件的目录中。您可以输入 mput 命令后跟文件或文件夹的名称,然后按Enter触发传输。
如果愿意的话,有很多命令可以帮助您进行未来的FTP传输。印第安纳大学(Indiana University)有一些有用的FTP命令,如果有兴趣可以查看。
什么是 SFTP?(What Is SFTP?)
SFTP(F)代表S SH文件传输(T)协议,是一种类似于(P)FTP的网络协议,它允许文件访问、传输和文件管理,但通过安全可靠的数据流进行。
与FTP不同,它不使用单独的命令和数据通道。相反,它在单个连接中传输特殊格式包中的文件。名称中的SSH代表Secure SH ell(S)协议,SFTP是该协议的扩展。这在使用SFTP(SFTP)协议时提供了更高级别的安全性。
您可以按照提供给FTP的相同方式使用SFTP,最大的区别在于安全连接。Filezilla 和 Cyberduck还(Cyberduck)提供SFTP作为其免费软件包的一部分,这绝对是您想要利用的东西。
连接到SFTP服务器时,它假定连接通过安全通道运行。这消除了对客户端身份验证的需要,因为客户端用户身份可用于协议。
WordPress是一个很好的例子,它允许FTP和SFTP连接。尝试将已保存的主题添加到计算机或服务器时,可能需要通过FTP或SFTP传输该主题。
这是为了避免WordPress拒绝您的主题在正常传输期间可能需要的某些代码行。其他文件也是如此,而不仅仅是主题。
SFTP和FTP之间的主要区别(Key Difference Between SFTP & FTP)
最显着和明显的区别在于定义。SFTP是一种安全的网络协议,而FTP不是。另一个是协议类型。FTP是基于TCP/IP的协议。SFTP是一种基于 SSH 的协议。
TCP / (P)IP(I)代表传输(T)控制协议(P)/互联网(C)协议。换句话说,它是管理互联网上所有计算机之间通信的标准协议。
- FTP在(FTP)TCP端口 21上建立控制连接,而SFTP在客户端和服务器之间通过(SFTP)SSH协议 建立的连接下传输文件。
- FTP仅以纯文本格式发送数据,而SFTP在发送到主机之前对其所有数据进行加密。
- SFTP也是提供主机到主机传输的独立协议,而FTP是更开放的协议。
不久前,为了给FTP增加一点安全性,Netscape创建了SSL或安全套接字层(S)((L)目前是 TLS ,(L)或(S)传输(S)层(T)安全)。然后将SSL(SSL)应用于FTP以创建FTPS。
这允许通过两种安全变体使用FTP以安全方式交换数据: FTPS 隐式 SSL(FTPS Implicit SSL)和FTPS 显式 SSL(FTPS Explicit SSL)。两者都(Both)使用SSL加密。
最后,大多数人需要担心的唯一关键区别是SFTP提供了一种将文件从一台主机传输到另一台主机的安全方式。FTP仅通过命令和数据通道两个通道提供纯文本的标准传输,没有加密。
HDG Explains : What Is SFTP & FTP?
In order for a computer netwоrk to exchаnge data and resources, it takes a collection of varіous devices such as routers, switches, and computers. That netwоrk would then need to follow a protocоl, lіkely multiple protocols, to establish proper communicаtion between all of thosе devices. FTP and SFTP are twо such protocols.
What is SFTP and FTP? FTP provides a way of exchanging files over the network whereas SFTP allows for the secure access, transfer, and management of files across data stream. FTP is data is sent as a plain text while SFTP encrypts all data to being sent out.
The primary difference between FTP and SFTP is security. FTP does not provide a secure channel to transfer files between multiple devices, while SFTP does. Therefore, SFTP is more secure than FTP. However, this article will delve a little deeper into the differences between these two protocols.
HDG Explains: What Is SFTP & FTP?
To understand the differences between SFTP and FTP, you will first have to better understand what it is they both are and do. The uses vary only slightly between them yet the differences run a bit deeper than they appear at first glance.
What Is FTP?
FTP, or File Transfer Protocol, is a standard network protocol that allows files to be transferred over a network between a client (local computer) and a server.
Prior to operating systems having graphical user interfaces (GUIs) FTP was developed to send and receive files between older text-based computers and networks. It was one of the original programs used to access information on the internet well before Hypertext Transfer Protocol (HTTP) came around.
Today, there are three primary ways in which to use FTP: Graphical FTP Clients, Web Browser, and Command-line FTP. Each is suitable for various applications including desktops, servers, mobile devices and hardware platforms.
Graphical FTP Clients
These clients allow for files to be transferred in a drag and drop format. Filezilla is probably the most well-known free FTP client for Windows operating systems. For Mac there’s Cyberduck.
Typically, when opening a program, you’ll enter the FTP host, your username, and a password. Some servers may have it set up so that you can enter anonymously, in which case the username and password may not be needed.
You can then drag and drop files and folders from host to server (and vice versa), and wait for the transfer to complete.
Web Browser
Using a web browser to connect to an FTP server will likely be more familiar as you can connect to the FTP address the same way you would an HTTP address. A web browser also makes it easy to browse a larger directory, read files, and retrieve them. It will also do you the service of handling some site connection details and file transfers automatically.
Although web browser FTP can seem convenient, it is often slower and less reliable than a dedicated FTP client. They also tend to have fewer features.
Command-line FTP
You may not know it but your operating system likely has built-in command-line clients. So long as your operating system is Windows, Mac, or Linux anyway. Open your operating system’s prompt (command prompt for Windows, Terminal for Mac, or console for Linux) to get started.
Then, as an example, type in
ftp ftp.empire.gov
Now press Enter. Then, if you’re accessing your own account, use the username and password for that account. If accessing anonymously, use anonymous as your username and your email address as the password.
At this point, you’ll want to be in the directory where the files you want to move are stored. You can enter the mput command followed by the name of the file or folder, and press Enter to trigger the transfer.
There are plenty of commands for you to learn, if willing, that can assist you in future FTP transfers. Indiana University has a few useful FTP commands to check out if interested.
What Is SFTP?
SFTP, which stands for SSH File Transfer Protocol, is a network protocol similar to FTP in that it allows for file accessing, transferring, and file management but over a secure and reliable data stream.
Unlike FTP, it does not utilize separate command and data channels. Instead, it transfers files in specially formatted packages in a single connection. The SSH in the name stands for Secure SHell protocol, for which SFTP is an extension. This provides an added level of security when utilizing the SFTP protocol.
You can use SFTP in the same ways provided to FTP, the biggest difference being the secure connection. Filezilla and Cyberduck also offer SFTP as part of their free package which is definitely something you’ll want to take advantage of.
When connecting to an SFTP server it assumes that the connection is running over a secure channel. This removes the need for client authentication as the client user identity is made available to the protocol.
WordPress is an excellent example of a site that allows for both FTP and SFTP connections. When attempting to add a theme you’ve saved to your computer or a server, it could be necessary to transfer that theme via either FTP or SFTP.
This is to avoid WordPress from denying certain lines of code that your theme might require during a normal transfer. This is true of other files, not just themes.
Key Difference Between SFTP & FTP
The most notable and obvious difference is in the definition. SFTP is a secure network protocol whereas FTP is not. Another would be the protocol types. FTP is a TCP/IP based protocol. SFTP is an SSH-based protocol.
TCP/IP stands for Transmission Control Protocol/Internet Protocol. In other words, it’s the standard protocol that governs communications among all the computers on the internet.
- FTP establishes its control connection on TCP port 21 whereas SFTP transfers files under the connection established by the SSH protocol between client and server.
- FTP only sends data in plain text format while SFTP encrypts all of its data prior to being sent to the host.
- SFTP is also an independent protocol providing host to host transfers where FTP is a more open protocol.
A while back, in order to add a bit of security to FTP, Netscape created the SSL, or Secure Sockets Layer (currently TLS, or Transport Layer Security). SSL was then applied to FTP to create FTPS.
This allowed data to be exchanged in a secure manner using FTP via two secure variants: FTPS Implicit SSL and FTPS Explicit SSL. Both of which utilize SSL encryption.
In the end, the only key difference that most will need to worry about is that SFTP provides a secure way to transfer files from one host to another. FTP only provides a standard transmission of plain text through two channels, a command and a data channel, without encryption.