This is an old revision of the document!

Raw Site Settings

You can use raw site settings to setup advanced site settings.

In GUI, when configuring advanced settings which are not available on Advanced Site Settings dialog, use Raw Site Settings dialog.

In scripting, use -rawsettings switch of scripting command open (when the settings cannot be configured using session URL nor using any dedicated switch of the command).

Advertisement

In .NET assembly, use SessionOptions.AddRawSettings method (when the settings cannot be configured using any dedicated property of SessionOptions class).

For both scripting and .NET assembly, you can just configure the advanced settings on Advanced Site Settings dialog and have WinSCP generate the code for you.

See also raw transfer settings and raw configuration.

You will also use raw site settings syntax to mass-modify stored sites using /batchsettings command-line parameter.

Common Advanced Settings

Name Description Values
PingType Keepalives1 0 = Off, 1 = Sending of null SSH packets, 2 = Executing dummy protocol commands
PingIntervalSecs Seconds between keepalives
EncryptKeyPlain File encryption key
ProxyMethod Proxy type 0 = None, 1 = SOCKS4, 2 = SOCKS5, 3 = HTTP, 4 = Telnet (SFTP/SCP protocols only), 5 = Local (SFTP/SCP), For additional options with FTP protocol, see FtpProxyLogonType
ProxyHost Proxy host name
ProxyPort Proxy port number
ProxyUsername Proxy username
ProxyPassword Proxy password
FtpProxyLogonType FTP proxy types 1 = SITE %host, 2 = USER %proxyuser, USER %user@%host, 3 = OPEN %host, 4 = USER %proxyuser, USER %user, 5 = USER %user@%host, 6 = USER %proxyuser@%host, 7 = USER %user@%host %proxyuser, 8 = USER %user@%proxyuser@%host
ProxyDNS Do DNS name lookup at proxy end 0 = Off, 1 = On, 3 = Auto
ProxyLocalhost Consider proxying local host connections 0 = Off, 1 = On
ProxyTelnetCommand Telnet proxy command
ProxyLocalCommand Local proxy command
Compression SSH session compression 0 = Disabled, 1 = Enabled
AddressFamily Internet Protocol Version 0 = Auto, 1 = IPv4, 2 = IPv6
SshProt SSH protocol version 0 = SSH-1, 3 = SSH-2
SshNoUserAuth Bypass authentication entirely 0 = Disabled, 1 = Enabled
Cipher SSH encryption cipher selection policy Comma-separated list of cipher preference order, where names of ciphers are aes, blowfish, 3des, arcfour and des. Token WARN is used to delimit substandard ciphers. Example: blowfish,aes,3des,WARN,arcfour,des
KEX Key exchange algorithm selection policy Comma-separated list of KEX preference order, where names of KEXes are ecdh (ECDH), dh-gex-sha1 (DH Group Exchange), dh-group14-sha1 (DH group 14), rsa (RSA-based), and dh-group1-sha1 (DH group 1). Token WARN is used to delimit substandard KEXes. Example: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
HostKey Host key algorithm selection policy Comma-separated list of algorithm preference order, where names of algorithms are rsa, dsa, ecdsa and ed25519. Token WARN can used to delimit substandard algorithms. Example: ed25519,ecdsa,rsa,dsa,WARN
RekeyBytes Max data before rekey
AuthKI Attempt keyboard-interactive authentication 0 = Disabled, 1 = Enabled
AuthGSSAPI Attempt GSSAPI authentication 0 = Disabled, 1 = Enabled
TryAgent Attempt Authentication Using Pageant 0 = Disabled, 1 = Enabled
LogicalHostName Logical name of remote host/GSSAPI/SSPI/Kerberos Service principal name/Server realm
GSSLibs Preference order of GSSAPI libraries Comma (,) separated list of gssapi32, sspi and custom.
GSSCustom User-supplied GSSAPI library path
FtpAccount FTP account
FtpForcePasvIp2 Force IP address for passive mode connections 0 = On, 1 = Off, 2 = Auto
FtpUseMlsd Use MLSD command for directory listing 0 = On, 1 = Off, 2 = Auto
FtpListAll Support for listing of hidden files 0 = On, 1 = Off, 2 = Auto
Tunnel Connection tunneling 0 = Disabled, 1 = Enabled
TunnelHostName Tunnel host name
TunnelPortNumber Tunnel port number
TunnelUserName Tunnel user name
TunnelPasswordPlain Tunnel password
TunnelHostKey Fingerprint of expected SSH tunnel host key
TunnelPublicKeyFile Path to tunnel private key file
Utf UTF-8 Encoding for Filenames 0 = Off, 1 = On, 2 = Auto
Shell Shell (SCP protocol)
LookupUserGroups2 Lookup user groups 0 = On, 1 = Off, 2 = Auto
LocalDirectory Local Directory2
TimeDifference Time zone offset Hexadecimal representation of 64-bit IEEE 754 floating point number (double), representing the offset in days.
Example: 555555555555A5BF = -1 hour3
ConsiderDST Daylight Saving Time 0 = Adjust remote timestamp with DST, 1 = Adjust remote timestamp to local conventions, 2 = Preserve remote timestamp
ResolveSymlinks Resolve symbolic links 0 = Disabled, 1 = Enabled
FollowDirectorySymlinks Follow symbolic links to directories 0 = Disabled, 1 = Enabled
ExitCode1IsError Consider exit code 1 from remote commands as an error. 0 = Disabled, 1 = Enabled
SftpServer Path to SFTP server binary For example sudo su -c /bin/sftp-server
SFTPMaxVersion Preferred SFTP protocol version 0-5 = SFTP version number
MinTlsVersion Minimum TLS/SSL version 3 = SSL 3.0, 10 = TLS 1.0, 11 = TLS 1.1, 12 = TLS 1.2
MaxTlsVersion Maximum TLS/SSL version See MinTlsVersion
SendBuf Optimize connection buffer size 0 = Off, Any positive value = On, value indicates size of the buffer, with recommended value of 262144
The SshSimple may need to be set to 1 to disable some of the optimizations, that unchecking the GUI option disables.
EOLType End-of-line characters 0 = LF, 1 = CRLF
TrimVMSVersions Trim VMS Version Numbers 0 = Off, 1 = On
PostLoginCommands FTP Post login commands If you need to execute multiple commands, separate them by new-line (line-feed, hexadecimal UTF-8 code 0A). I.e. in scripting use %0A (-rawsettings PostLoginCommands=CMD1%0ACMD2), in C# use \n, in PowerShell use `n
InternalEditorEncoding Override of default internal editor encoding -1 = use global preferences, 0 = ANSI encoding, 65001 = UTF-8 encoding.

Advertisement

Example

For example to enable HTTP proxy, in scripting:

open <session_url> -rawsettings ProxyMethod=3 ProxyHost=proxy

or in .NET assembly (using PowerShell):

$sessionOptions.AddRawSettings("ProxyMethod", "3")
$sessionOptions.AddRawSettings("ProxyHost", "proxy")

Keywords

For boolean settings that have values 0 for Off/Disabled and 1 for On/Enabled (like AuthGSSAPI), you can use off and on keywords instead.

For settings that have values 0 for Off, 1 for On and 2 for Auto (like FtpUseMlsd), you can use off/on/auto keywords instead.

This feature is available only in the latest beta release.

  1. Enabling keepalives has very limited effect in scripting (except for keepuptodate command) and almost no effect in .NET assembly.Back
  2. Note that Remote Directory can be set using session URL, you do not need to use raw site settings for it.Back
  3. In C# you can calculate -1 hour offset using: string.Join("", BitConverter.GetBytes(TimeSpan.FromHours(-1).TotalDays).Select(b => b.ToString("X2"))).Back

Last modified: by martin