Supported Transfer Protocols

WinSCP supports two secure transfer protocols, SFTP and SCP. Currently, many SSH servers support both protocols. Each has its advantages and disadvantages; this document contains a comparison to help you to decide which is most appropriate for your needs. The comparison describes both features that are characteristic to the specific protocol as-is, and features that are caused by the implementation of the protocol in WinSCP.

The default mode of operation is to use SFTP and fall back to SCP. Select your preferred protocol on Login dialog.

SFTP (SSH File Transfer Protocol)

Despite SSH in its name, it is designed to work over any reliable data stream, but WinSCP supports only operation over SSH, which is also by far its most common usage.

Being operated over SSH, it is secure protocol. In its basic functionally it is similar to old FTP, while having better designed advanced functionality. Unfortunately not all SFTP server implementation take advantage of the advanced features, yet.

Unlike SCP, for connection with an SFTP server you do not need access to shell (although some implementations may still require that).

SCP (Secure Copy Protocol)

SCP is mostly used with SSH-1. SCP is an older protocol, but almost universally supported on Unix-like platforms as part of an SSH protocol suite. It is rarely supported on other platforms. SCP is a descendant of the ancient "rcp."

The SCP protocol allows only file transfers in both directions. WinSCP is able to offer other features, implemented using common shell commands like cd, ls, pwd, rm, ln, etc. For this, WinSCP - unlike command-line SCP clients (which allow only file transfers) - requires full shell access and permission to execute other commands in addition to scp (see requirements). For access to non-UNIX servers it is necessary that the server have at least a UNIX-like shell: one like that which is available with OpenSSH for Windows, for example.

Protocol Comparison

The list below shows only those features, which differ between the protocols, so it is not complete listing.

Feature SFTP SCP
Speed Generally slowest (necessity to wait for packet confirmations). Faster (efficient file transfer, yet it does not allow the transfer to be interrupted).
Transfer resume Supported. WinSCP supports resuming only since SFTP-2 (which introduces rename command). By default it resumes transfers for files larger than 100 kB only, since the overhead is excessive for smaller files. It is possible to change the threshold in Preferences. Unsupported.
Large files Supports files over 4 GiB (uses 64-bit sizes). Does not support files over 4 GiB (32-bit boundary).
Append to end of file Supported. Unsupported.
Transfer cancellation Supported. Transfer cannot be canceled without termination of session.
Text (ASCII) transfer mode Supported since SFTP-4. For older versions WinSCP emulates text mode by converting files before transfer. Not supported by the protocol. WinSCP emulates text mode by converting file before transfer.
Directory operations Recursive operations with directories (deletion, permissions change) must be performed separately for each file. Thus operations can take a long time, especially for directories with a large number of files. Recursive operations with directories (deletion, permissions change), can be done with a single command (rm, chmod, etc). Thus they are quick. On the other hand it limits some functionality.
File renaming and moving Supported since SFTP-2. Supported (mv).
Direct File duplication Unsupported by the protocol. WinSCP can open a separate shell session to execute the command. Supported (cp).
Execution of arbitrary command Unsupported by the protocol. WinSCP can open a separate shell session to execute the command. Supported as long as the command does not require user input.
Owner or group change In SFTP-2 and SFTP-3, the owner and group can be changed only with knowledge of UID/GID. Since SFTP-4 even change using user or group name is allowed. Supported (chown, chgrp).
Checksum calculation Supported, if the server supports respective SFTP protocol extension. Unsupported.
User group list lookup Unsupported. Supported (groups).
Influence of environment variables Generally unaffected by environment variables. As WinSCP uses shell, it is influenced by environment variables (date format, etc.). WinSCP requires the English environment. See requirements.
File modification time-stamp Theoretically the problem does not occur, as the protocol requires timestamps to be in UTC. Practically some of the SFTP servers have problems with DST. Some shell commands are influenced by daylight-saving time. For example, the ls command can return a different time than scp. Thus, after transfer, the time-stamp of the file can be different. Also there can be an additional difference caused by the server timezone offset. This causes trouble when comparing directories and synchronization.
Configuration Generally, only login information is needed. For a successful connection to a server it is often necessary to properly set up several configuration options on the Login dialog.