winscp

最後更新: 2016-11-08

介紹

 


Scripting

 

winscp.com /passive=on /script=ftpscript.txt

ftpscript.txt

# Connect
open ftp://user2:password@example.com/

# Change the remote directory
cd MyFolder/

# Upload the file to current working directory
# Folder 要加 '/' 在尾
# 當 file 在 local 時, 不會問就會 overwrite
get test.txt c:\test\

# 沒有 Disconnect 及 Exit 時, 它就會仍然在 shell
# Disconnect
close

# Exit WinSCP
exit

 


File Encryption

 

WinSCP can seamlessly encrypt your files on an SFTP server using AES-256 CTR  encryption.

seamlessly:

anyone else, who does not know the key, including a server Administrator, will see only gibberish.

Requirements on Server File System

Filename Encryption

Encryption of file names uses Base64 encoding.

To preserve file names encoded in Base64 encoding, the target file system should be case-sensitive

File Content

Fixed file header aesctr.......... is written to the output file.

16 bytes (128 bits) of salt is generated and written to the output file.

Empty files are encoded as empty files (no header nor salt).
 


Winscp Usage

 

WinSCP will search down the list from the top until it finds an algorithm supported by the server, and then use that.

If the algorithm WinSCP finds is below the warn below here line, you will see a warning box when you make the connection

 

Get two warnings similar to the one above, possibly with different encryptions.

In SSH-2, the encryption algorithm is negotiated independently for each direction of the connection,

although WinSCP does not support separate configuration of the preference orders.
 

 * Winscp 不支援指定用那 Encryption type, 比如指定用 arcfour