Technical Notes |
|
This technical note explains how the scp and sftp file transfer utilities interact with SSH to provide secure file transfer.
The SSH protocol provides strong encrypted authentication and a secure encrypted tunnel through which you can move data and execute remote commands securely.
There are two different and incompatible implementations of the SSH protocol; SSH-2 and SSH-1. While the Reflection Windows clients support both protocols, it is highly recommended that you use the newer protocol, SSH-2, rather than SSH-1, which is deprecated.
This technical note assumes that you are using Reflection with SSH-2.
The file transfer capabilities of SSH are provided by utilities included with most SSH products, such as Reflection and the Reflection for Secure IT Windows and UNIX Clients. Typically, these utilities are called scp and sftp.
The scp and sftp utilities use the SCP and SFTP protocols (respectively) to provide file transfer capabilities and use the encrypted SSH tunnel to provide security.
Important distinction: The file transfer protocol SFTP is not a 'secure version' of the standard FTP protocol. It is a completely different protocol. You cannot connect to an FTP server using SFTP or to an SFTP server using FTP.
There are two ways that scp utilities can implement file transfers; one implementation is based on OpenSSH and uses SCP over SSH, the other uses SFTP over SSH. These are two very different implementations and these differences can cause an incompatibility between some scp client utilities and some SSH servers.
The following clients use scp based on OpenSSH (using SCP over SSH) and are incompatible with these non-OpenSSH-based SSH servers.
| These Clients |
CANNOT Connect to these Servers |
| - Reflection 13.0.3 or earlier - Reflection for Secure IT Windows Client 6.0 - OpenSSH client - scp client in SSH-1 Compatibility mode |
- Reflection for Secure IT Windows Server 6.x - F-Secure SSH Windows or UNIX Server |
Alternatively, these SSH servers are compatible with applications that use scp based on OpenSSH (using SCP over SSH), including these versions of Reflection.
| These Clients |
CAN Connect to these Servers |
| - Reflection 13.0.3 or earlier - Reflection for Secure IT Windows Client 6.0 - OpenSSH client - scp client in SSH-1 Compatibility mode |
- Reflection for Secure IT UNIX Server 6.0 or higher - Reflection for Secure IT Windows Server 7.0 or higher * - OpenSSH servers |
* To use these older Reflection clients with Reflection for Secure IT Windows Server 7.0 or higher, you must configure Reflection for Secure IT Windows Server to Allow SCP1 (from the Permissions panel).The term SCP1 does not mean that the SSH-1 protocol is being used; rather, that Reflection should allow the use of OpenSSH-based scp client utilities to transfer files. The scp client is still running over SSH-2.
Starting in Reflection 13.0.4 and Reflection for Secure IT 6.1, the scp utility included with Reflection uses SFTP over SSH for file transfers; however, even though SFTP is being used in the background, to the end user the utility appears to still be using SCP.
Reflection Windows clients ship with scp, scp2*, sftp, and sftp2* file transfer utilities. Reflection uses the SFTP protocol (SFTP over SSH) for all four of these utilities.
For these versions of Reflection to successfully access an SSH server, the server must be configured to use an sftp subsystem to provide file transfer capabilities. Most SSH servers, including the OpenSSH servers, can be configured to support SFTP and have an sftp subsystem.
* The number "2" in "scp2" and "sftp2" is there to indicate that the scp2 and sftp2 file transfer utilities behave like, and support the switches used by, the F-Secure SSH's scp2 and sftp2 utilities. scp2 and sftp2 are included in the current product to facilitate the smooth migration from F-Secure SSH Windows clients to Reflection for Secure IT and Reflection Windows clients. For further details, see Technical Note 1893.
The following sections detail what happens in the background when scp based on OpenSSH (using SCP over SSH) or scp/sftp (using SFTP) are used.
When an sftp or scp (using SFTP) command is issued, the following occurs:
The SSH tunnel remains open until the bye command is issued, allowing multiple sftp commands to be issued before it is closed.
When an scp command is issued, the following occurs:
A new SSH tunnel is created and shut down for each scp command issued.