This is an old revision of the document!
WinSCP Technical Requirements
- Server Requirements
- SFTP Requirements
- SCP Requirements
- Using WinSCP with Restricted Shell Environments
- Effect of Remote User Environment on WinSCP Sessions
- Client Requirements
Advertisement
Server Requirements
您可以利用 WinSCP 連線到一台 SSH (Secure Shell) 伺服器使用它的 SFTP (SSH File Transfer Protocol) 或 SCP (Secure Copy Protocol) 服務;也可以利用 WinSCP 連線到一台 FTP (File Transfer Protocol) 伺服器。
SFTP 是 SSH-2 套件標準的其中一部分。SCP 是 SSH-1 套件標準的其中一部分。這兩者都可以在更新的 SSH 版本上被執行,而WinSCP 同時支援 SSH-1 及 SSH-2。在認證上,使用者可以透過帳號密碼的方式認證,亦可透過 public key (RSA or DSA) 方式進行認證。此外,WinSCP 還支援了其他的認證方式,例如 TLS、Cryptocard 及 Keyboard-interactive。
對於 FTP,WinSCP 支援基本的 FTP 功能,但是 FTP over SSL 及壓縮傳送功能(Zlib)目前尚未支援。
SFTP Requirements
對於 SFTP 來說,唯一的需求只有伺服器必須能執行 SFTP。換句話說,伺服器最好為 SSH-2 環境。如果您在 WinSCP 登錄頁面中中選擇 SFTP-only 且伺服器並沒有執行 SFTP 環境,WinSCP 將會嘗試著在常見的系統目錄下搜尋 SFTP 伺服端程式(例如/usr/lib/sftp-server
, /usr/local/lib/sftp-server
)。如此一來,就可以達到在 SSH-1 環境下使用 SFTP 的目的。
SCP Requirements
To transfer files, scp1
is used (it is called from within scp
). If only scp2
is allowed on your server, check the Use scp2 with scp1 compatibility option on the SCP/Shell tab in the Login dialog.
For correct functionality, it is necessary to satisfy a few conditions. The bash
shell is recommended for working with WinSCP. If your default shell doesn’t work with WinSCP, you can make WinSCP use other shell.
Advertisement
For its operation, WinSCP needs several commands: alias
, cd
, chgrp
, chmod
, chown
, echo
, groups
, ls
, mkdir
, mv
, pwd
, scp
, rm
, ln
, unalias
and unset
. These commands have to be placed in the path and user must have sufficient permissions to execute them. WinSCP expects “standard” behaviour of these commands. You can avoid needing these commands by not using some of WinSCP functions (mkdir
, chown
, ln
, etc.) or by changing some configuration options (alias
, groups
, unalias
and unset
).
Just after establishing the connection with server, all aliases on the above commands are cleared. This is done to avoid unexpected behaviour.
Another precondition is that the output of all commands is in English. This mostly concerns names of months in directory listings (ls -la
). Because of this, WinSCP clears all user variables that govern command output after login. If command output also reflects some other server settings, it may be necessary to change this before WinSCP can be used.
The last necessary condition is the proper output of ls -la
command, which is supposed to include file group name! If the group name is absent, it can be temporarily added using the Alias LS to display group name option on the SCP/Shell tab in the Login dialog. WinSCP will attempt detect support for --full-time
switch of the ls
command. If the detection causes you problems, you can disable it.
Using WinSCP with Restricted Shell Environments
A number of restricted shell environments exist for supporting SFTP/SCP only accounts. These systems restrict the user to a small subset of commands needed to manipulate files while denying the ability to execute arbitrary commands. Some of these environments create incompatibilities with WinSCP, particularly if using SCP.
Effect of Remote User Environment on WinSCP Sessions
Most shells nowadays offer options to make the user experience better. Unfortunately many of these options make the shell incompatible with WinSCP.
This mainly affects the SCP protocol. An example is colorized output with the ls
command that outputs ANSI color sequences to the command output which WinSCP is
unable to parse.
Also, the SFTP protocol can be affected. A typical example is where some message is printed from a start-up script. WinSCP (and any other SFTP client) will attempt to parse the message as an SFTP packet, which will obviously fail.
You should configure your start-up scripts to conform to non-interactive sessions (like WinSCP). Some shells call different profile/start-up scripts for interactive and non-interactive sessions. You can also use some environment variables, such as TERM
to distinguish interactive and non-interactive sessions.
Client Requirements
WinSCP 必須在 Windows 95 或更新版本上執行,並且需要至多 10 Mb 的硬碟空間。
WinSCP 也可以在具備 Crossover 4.x 或更新版本的 Linux 環境上執行。(Crossover 是屬於 Wine 計畫中的商業研發工具)