There are several different secure file transfer protocols that are, unfortunately, named in a very confusing way that often makes it difficult to distinguish one from another. The aim of this page is to provide some guidelines to make it easier to determine which is which.
Communication protocols
Basically, there are the following file transfer protocols around:
FTP – the plain old FTP protocol that has been around since 1970s. The acronym stands for "File Transfer Protocol". It usually runs over TCP port 21.
SFTP – another, completely different file transfer protocol that has nothing to do with FTP. SFTP runs over an SSH session, usually on TCP port 22. It has been around since late 1990s. The acronym actually stands for "SSH File Transfer Protocol".
SCP – a variant of BSD rcp utility that transfers files over SSH session. The SCP protocol has been mostly superseded by the more comprehensive SFTP protocol and some implementations of the "scp" utility actually use SFTP instead.
Secure communication layers
Additionally, there are the following two secure communication layers:
SSH – a protocol that allows establishing a secure channel between the local and the remote computer. Server as an underlying channel for associated protocols such as secure shell, port forwarding, SFTP or SCP. While it is possible to run the (slightly modified) plain old FTP protocol over SSH, this is not very common, fortunately. File transfer over SSH is nearly always done using SFTP or SCP.
TLS – this is almost generally known primarily by its old name - SSL - and provides a way of securing otherwise unsecure protocols such as HTTP, SMTP, POP3 or FTP. Please note that SSL 3.1 is called TLS 1.0, and therefore TLS 1.0 is a newer version of the protocol than SSL 3.0, despite the lower version number. HTTP over SSL is often called HTTPS, and FTP over SSL is often called FTPS and has two variants, explicit (starts as an unencrypted FTP session and is secured on client request) and implicit (is secured right from the beginning and therefore needs a separate TCP port, usually 990). The implicit mode is deprecated, but still widely used.
Secure file transfer protocols, or fitting it all together
In an ideal world, the information above should be just enough. Unfortunately, this is not the case. The file transfer protocols are also referred to by other names, and even the names that only refer to a one single protocol are often mistakenly used for the wrong protocol by (understandably) confused authors.
FTP – should be only used for the plain old FTP protocol.
SFTP – should be only used for SFTP, the SSH file transfer protocol. However, people often shorten Secure FTP into SFTP - this is not correct, because the S in SFTP does not stand for Secure, but for SSH.
SFTP2 – this confusing name is used by some vendors to highligh the obvious fact that their SFTP protocol runs over SSH2. For all practical purposes, consider this to be a synonym of SFTP, because SSH1 has been deprecated for many years.
Secure FTP – this name is the most confusing, because it is used to refer to either of the two different protocols. Whenever this name is used, it is necessary to specify whether the SSH-based or SSL-based file transfer protocol is meant.
SSH FTP, FTP over SSH – fortunately, these names are not used very often. They usually refer to SFTP, the SSH file transfer protocol. Even though it is possible to run the (slightly modified) plain old FTP protocol over SSH, this is not very common.
FTP/SSL, FTP/TLS, FTP over SSL, FTP over TLS, FTPS – should be only used for FTP over TLS/SSL.
SFTP over SSL – although the SFTP protocol can utilize any underlying data stream, in practice SFTP over anything other that SSH is very rare. It is much more likely the term was used by mistake in place of either "SFTP over SSH" or "FTP over SSL".
SCP – should be only used for scp protocol/utility, a variant of BSD rcp. Some applications with SCP in its name now use SFTP by default instead - examples of this practice are WinSCP application and scp2 utility.
TFTP is yet another file transfer protocol different from any of above.
1. SFTP: SSH File Transfer Protocol
2. FTPS: FTP over SSL
3. FTP over SSH
<from wikipedia>
FTP over SSH (not SFTP) refers to the practice of tunneling a normal FTP session over an SSH connection.
Because FTP uses multiple TCP connections (unusual for a TCP/IP protocol that is still in use), it is particularly difficult to tunnel over SSH. With many SSH clients, attempting to set up a tunnel for the control channel (the initial client-to-server connection on port 21) will protect only that channel; when data is transferred, the FTP software at either end will set up new TCP connections (data channels), which bypass the SSH connection, and thus have no confidentiality, integrity protection, etc.
TPS vs. SFTP: What to Choose
原文:www.codeguru.com/csharp/.net/net_general/internet/article.php/c14329
File transfer over the network using FTP protocol (defined by RFC 959 and later additions) has its roots in 1980, when the first RFC for FTP protocol was published. FTP provides functions to upload, download, and delete files; create and delete directories; and read directory contents. Although FTP is very popular, it has certain disadvantages that make it harder to use. The major drawbacks are lack of the uniform format for directory listing (this problem has been partially solved by introducing the MLST command, but it's not supported by some servers) and the presence of the secondary connection (DATA connection). Security in FTP is provided by employing SSL/TLS protocol for channel encryption as defined in RFC 2228. The secured version of FTP is called FTPS.
In UNIX systems, another security standard has grown. It was the SSH family of protocols. The primary function of SSH was to secure remote shell access to UNIX systems. Later, SSH was extended with file transfer protocol—first SCP (in SSH 1.x), and then SFTP (in SSH2). Version 1 of the SSH protocol is outdated, unsecure, and generally not recommended for use. Consequently, SCP is not used anymore and SFTP gains popularity day by day.
The "SFTP" abbreviation is often mistakenly used to specify some kind of Secure FTP, by which people most often mean FTPS. Another (similar) mistake is that SFTP is thought to be some kind of FTP over SSL. In fact, SFTP is an abbreviation of "SSH File Transfer Protocol." This is not FTP over SSL and not FTP over SSH (which is also technically possible, but very rare).
SFTP is a binary protocol, the latest version of which is standardized in RFC 4253. All commands (requests) are packed to binary messages and sent to the server, which replies with binary reply packets. In later versions, SFTP has been extended to provide not just file upload/download operations, but also some file-system operations, such as file lock, symbolic link, creation, and so forth.
Both FTPS and SFTP use a combination of an asymmetric algorithm (RSA, DSA), a symmetric algorithm (DES/3DES, AES, Twhofish and so on), and a key-exchange algorithm. For authentication, FTPS (or, to be more precise, SSL/TLS protocol under FTP) uses X.509 certificates, whereas SFTP (SSH protocol) uses SSH keys.
X.509 certificates include the public key and certain information about the certificate owner. This information lets the other side verify the integrity of the certificate itself and authenticity of the certificate owner. Verification can be done both by computer and to some extent by the human. An X.509 certificate has an associated private key that is usually stored separately from the certificate for security reasons.
A SSH key contains only a public key (the associated private key is stored separately). It doesn't contain any information about the owner of the key. Neither does it contain information that lets one reliably validate the integrity and authenticity. Some SSH software implementations use X.509 certificates for authentication, but in fact they don't validate the whole certificate chain—only the public key is used (which makes such authentication incomplete and similar to SSH key authentication).
Here's the brief list of pros and cons of the two protocols:
FTPS
Pros:
- Widely known and used
- The communication can be read and understood by humans
- Provides services for server-to-server file transfer
- SSL/TLS has good authentication mechanisms (X.509 certificate features)
- FTP and SSL/TLS support is built into many Internet communication frameworks
Cons:
- Doesn't have a uniform directory listing format
-
Requires a secondary DATA channel, which makes it hard to use behind the firewalls
- Doesn't define a standard for file name character sets (encodings)
- Not all FTP servers support SSL/TLS
- Doesn't have a standard way to get and change file and directory attributes
SFTP
Pros:
- Has good standards background that strictly defines most (if not all) aspects of operations
-
Has only one connection (no need for DATA connection)
- The connection is always secured
- The directory listing is uniform and machine-readable
- The protocol includes operations for permission and attribute manipulation, file locking, and more functionality
Cons:
- The communication is binary and can't be logged "as is" for human reading
- SSH keys are harder to manage and validate
- The standards define certain things as optional or recommended, which leads to certain compatibility problems between different software titles from different vendors
- No server-to-server copy and recursive directory removal operations
- No built-in SSH/SFTP support in VCL and .NET frameworks
What to Choose
As usual, the answer depends on what your goals and requirements are. In general, SFTP is technologically superior to FTPS. Of course, it's a good idea to implement support for both protocols, but they are different in concepts, in supported commands, and in many other things.
It's a good idea to use FTPS when you have a server that needs to be accessed from personal devices (smartphones, PDAs, and the like) or from some specific operating systems that have FTP support but don't have SSH/SFTP clients. If you are building a custom security solution, SFTP is probably the better option.
As for the client side, the requirements are defined by the server(s) that you plan to connect to. When connecting to Internet servers, SFTP is more popular because it's supported by Linux and UNIX servers by default.
For private host-to-host transfer, you can use both SFTP and FTPS. For FTPS, you would need to search for a free FTPS client and server software or purchase a license for commercial one. For SFTP support, you can install an OpenSSH package that provides free client and server software.
Developer Tools
If you are a software developer and need to implement file transfer capability in your application, you will be searching for the components to do the job.
In .NET, you have built-in support for FTPS in the .NET Framework (see the FtpWebRequest class). However, functionality of this class is severely limited, especially in the SSL/TLS control aspect. The .NET Framework doesn't include any support for SSH or SFTP.
In VCL, you have a selection of free components and libraries that provide FTP functionality. When you add OpenSSL to them, you can get FTPS for free. If you don't want to deal with OpenSSL DLLs, you can use one of the commercially available libraries for SSL and FTPS support. Again, there are no freeware SFTP components available for .NET.
If you use a tool with which you have to use ActiveX controls, you need to search for commercial FTPS or SFTP controls. No free controls are available. SecureBlackbox library provides both FTPS and SFTP support for .NET, VCL and ActiveX technologies.
相关推荐
FTPS(FTP over SSL/TLS)是一种基于 SSL/TLS 协议的文件传输协议,它使用 SSL/TLS 协议加密传输数据。FTPS 是 FTP-over-SSL 的意思,即 FTP 借助 SSL 协议加密传输。 两者的主要区别在于加密方法,SFTP 使用 SSH ...
首先,Atom Remote FTP 插件支持多种协议,包括 FTP(文件传输协议)、FTPS(安全文件传输协议,也称为 FTP over SSL 或 TFTP)以及 SFTP(SSH 文件传输协议)。这些协议允许用户在本地计算机和远程服务器之间安全...
FTP、SFTP、FTPS 总结 FTP(File Transfer Protocol,文件传输协议)是一种用于在网络上传输文件的协议。它是基于 TCP/IP 协议的应用层协议,主要用于在客户端和服务器之间传输文件。 FTP 的主要特点是: 1. 基于...
3. **加密传输**:使用FTPS(FTP over SSL/TLS)或SFTP(SSH File Transfer Protocol)能提供数据传输过程中的加密,防止中间人攻击。 4. **限制权限**:对每个账号设置适当的访问权限,例如只允许读取或写入,避免...
node-ftps, FTP FTPS和SFTP客户端 node.js,主要是lftp封装器 节点 ftps FTP 。FTPS和SFTP客户端 node.js,主要是 lftp 封装器。 要求你需要在计算机上安装可以执行 lftp 。LFTP主页Windows ( Chocolatey )C:&
标题"SolarWinds-SFTP-SCP-Server.zip"指出,这是一个与SolarWinds相关的软件包,主要用于提供SCP(Secure Copy Protocol)和SFTP(Secure File Transfer Protocol)服务。这两个协议都是安全的数据传输协议,用于在...
在Linux操作系统中,数据传输是日常任务的一部分,无论是文件共享还是备份,SFTP(Secure File Transfer Protocol)和FTP(File Transfer Protocol)都是常用的工具。本文将深入探讨如何使用curl命令来实现在Linux...
Facade-FS 提供一个对常见文件系统(本地文件系统/FTP/SFTP/OSS)统一访问的 API 接口. 快速入门 这里提供个简单的例子, 创建一个文件并读取信息 // 创建一个从 ftp 读取文件的文件系统 uri // String ftpUri = "ftp:/...
在这款编辑器中,FTP(File Transfer Protocol)和SFTP(Secure File Transfer Protocol)扩展插件是极其重要的组成部分,它们允许用户直接在编辑器中管理远程服务器上的文件,极大地提升了开发和协作的效率。...
为了克服这个缺陷,FTP可以与SSL/TLS结合,形成FTPS(FTP over SSL)或SFTP(Secure File Transfer Protocol,尽管SFTP通常指的是SSH File Transfer Protocol,而不是FTP的SSL版本)。FTPS有两种模式:隐式和显式。...
历经一个月,从初学者的角度学习了套接字技术,并以vsftp为ftp服务器,在suse11机器上用c语言写了一个ftp客户端,实现了文件的下载功能。本程序适合初学者学习linux和ftp技术,利用套接字实现网络编程。
spark 读取sftp文件 下面是用法 // Construct Spark dataframe using file in FTP server DataFrame df = spark.read(). format("com.springml.spark.sftp"). option("host", "SFTP_HOST"). option("username", ...
支持FTP, FTP并支持SSL/TLS (FTPS)协议,支持SSH文件传输协议(SFTP) 跨平台。在 Windows, Linux, *BSD, Mac OS X 和其它平台下运行 more 支持IPv6协议 多种可用的语言(包含中文) 断点续传且支持容量大于4GB的文件 ...
标题中的“sftp.rar_FTP搜索器_SFtp.e_ftp_ftp搜索_sftp”暗示了这个压缩包可能包含一个FTP搜索工具,名为SFtp.e,它支持FTP和SFTP协议,用于查找并访问网络上的资源。FTP(File Transfer Protocol)是互联网上用于...
cmdftp.sh $1 : 主机IP $2 :用户名 $3 :用户密码 $4 : 本地文件路径 $5 :FTP服务器文件路径 $6 :mput/mget 命令 $7 :要操作的文件名称 cmdsftp.sh $1 : 主机IP $2 :用户名 $4 : 本地文件路径 $5 :FTP服务器...
NULL 博文链接:https://lpyyn.iteye.com/blog/2065149
支持SSL加密和ODBC数据库,服务器运行时占用很少的CPU和内存资源. 用它独创的高效网络算法,它能够比其他Windows FTP服务器处理更多的用户.它还有很多其他FTP服务器没有的独特功能.强大的访问控制规则,可以用来隐藏...
### scp、ftp与sftp的区别及使用方法 #### 一、SCP(Secure Copy Protocol) **定义:** SCP(Secure Copy Protocol)是一种通过SSH协议进行安全数据传输的协议。它允许用户在不同主机之间安全地复制文件,并且...
3. **SFTP (Secure File Transfer Protocol)**: SFTP是SSH框架下的安全文件传输协议。Python的`paramiko`库提供了对SFTP的支持。通过`paramiko.SSHClient()`创建客户端,`connect()`建立连接,`sftp`属性访问SFTP...
SFTP是Secure File Transfer Protocol的缩写,它是在SSH(Secure Shell)协议框架下运行的一种安全文件传输子协议。SFTP的主要特点是数据传输过程中的加密,确保了数据的机密性和完整性,防止了中间人攻击。与FTP...