rawsettings » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
rawsettings 2012-08-14 | rawsettings 2024-10-23 (current) | ||
Line 1: | Line 1: | ||
- | ====== Raw Session Settings ====== | + | ====== Raw Site Settings ====== |
- | You can use raw session settings to setup advanced session settings, | + | You can use raw site settings to setup advanced site settings. |
- | * in [[scripting]], using ''-rawsettings'' switch of scripting command ''[[scriptcommand_open|open]]'' (when the settings that cannot be configured using [[session_url|session URL]] nor using any dedicated switch of the command); | + | |
- | * in [[library|.NET assembly]], using ''[[library_sessionoptions#methods|SessionOptions.AddRawSettings]]'' method (when the settings cannot be configured using any dedicated property of ''[[library_sessionoptions|SessionOptions]]'' class). | + | |
- | Common advanced settings settings: | + | In GUI, when configuring advanced settings which are not available on [[ui_login_advanced|Advanced Site Settings dialog]], use [[ui_login_raw|Raw Site Settings dialog]]. |
+ | |||
+ | In [[scripting]], use ''[[scriptcommand_open#rawsettings|-rawsettings]]'' switch of scripting command ''[[scriptcommand_open|open]]'' (when the settings cannot be configured using [[session_url|session URL]] nor using any dedicated switch of the command). | ||
+ | |||
+ | In [[library|.NET assembly]], use ''[[library_sessionoptions_addrawsettings|SessionOptions.AddRawSettings]]'' method (when the settings cannot be configured using any dedicated property of ''[[library_sessionoptions|SessionOptions]]'' class). | ||
+ | |||
+ | For both scripting and .NET assembly, you can just configure the advanced settings on [[ui_login_advanced|Advanced Site Settings dialog]] and have WinSCP [[ui_generateurl|generate the code for you]]. | ||
+ | |||
+ | See also [[rawtransfersettings|raw transfer settings]] and [[rawconfig|raw configuration]]. | ||
+ | |||
+ | You will also use raw site settings syntax to mass-modify stored sites using ''[[commandline#batchsettings|/batchsettings]]'' command-line parameter. | ||
+ | |||
+ | ===== Common Advanced Settings ===== | ||
^ Name ^ Description ^ Values ^ | ^ Name ^ Description ^ Values ^ | ||
- | | ''PingType'' | [[ui_login_connection#keepalives|Keepalives]] | ''0'' = Off, ''1'' = Sending of null SSH packets, ''2'' = Executing dummy protocol commands | | + | | ''==PingType=='' | [[ui_login_connection#keepalives|Keepalives]] ((Enabling keepalives has very limited effect in [[scripting]] (except for ''[[scriptcommand_keepuptodate|keepuptodate]]'' command) and almost no effect in [[library|.NET assembly]].)) | ''0'' = Off, ''1'' = Sending of null SSH packets, ''2'' = Executing dummy protocol commands | |
- | | ''PingIntervalSecs'' | Seconds between keepalives | | + | | ''PingIntervalSecs'' | Seconds between keepalives | | |
- | | ''ProxyMethod'' | [[ui_login_proxy|Proxy type]] | ''0'' = None, ''1'' = SOCKS4, ''2'' = SOCKS5, ''3'' = HTTP, ''4'' = Telnet, ''5'' = Local | | + | | ''==EncryptKeyPlain=='' | [[ui_login_encryption|File encryption key]] | | |
- | | ''ProxyHost'' | Proxy host name | | + | | ''==ProxyMethod=='' | [[ui_login_proxy|Proxy type]] | ''0''/''None'', ''1''/''SOCKS4'', ''2''/''SOCKS5'', ''3''/''%%HTTP%%'', ''4''/''Telnet'' (SFTP/SCP protocols only), ''5''/''Cmd'' = Local (SFTP/SCP). For additional options with FTP protocol, see ''FtpProxyLogonType''. //Symbolical value names are supported by the latest version only.// &recent | |
- | | ''ProxyHost'' | Proxy port number | | + | | ''ProxyHost'' | Proxy host name | | |
+ | | ''ProxyPort'' | Proxy port number | | | ||
+ | | ''ProxyUsername'' | [[ui_login_proxy#username_password|Proxy username]] | | | ||
+ | | ''ProxyPassword'' | Proxy password | | | ||
+ | | ''FtpProxyLogonType'' | [[ui_login_proxy|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'' | [[ui_login_proxy#dns|Do DNS name lookup at proxy end]] | ''0'' = No, ''1'' = Auto, ''2'' = Yes | | ||
+ | | ''ProxyLocalhost'' | [[ui_login_proxy#localhost|Consider proxying local host connections]] | ''0''/''off'' = Off, ''1''/''on'' = On | | ||
+ | | ''ProxyTelnetCommand'' | [[ui_login_proxy#command|Telnet proxy command]] | | | ||
+ | | ''ProxyLocalCommand'' | [[ui_login_proxy#command|Local proxy command]] | | | ||
+ | | ''==Compression=='' | [[ui_login_ssh#protocol_options|SSH session compression]] | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''==AddressFamily=='' | [[ui_login_connection#ipv|Internet Protocol Version]] | ''0'' = Auto, ''1'' = IPv4, ''2'' = IPv6 | | ||
+ | | ''SshNoUserAuth'' | [[ui_login_authentication#bypassing|Bypass authentication entirely]] | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''==Cipher=='' | [[ui_login_ssh#encryption_options|SSH encryption cipher selection policy]] | Comma-separated list of cipher preference order, where names of ciphers are ''aes'', ''chacha20'', ''aesgcm'', ''3des'', ''des'', ''blowfish'' and ''arcfour''. Token ''WARN'' is used to delimit substandard ciphers. Example: ''blowfish,aes,3des,WARN,arcfour,des'' | | ||
+ | | ''==KEX=='' | [[ui_login_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 ''ed448'', ''rsa'', ''dsa'', ''ecdsa'' and ''ed25519''. Token ''WARN'' can used to delimit substandard algorithms. Example: ''ed448,ed25519,ecdsa,rsa,dsa,WARN'' | | ||
+ | | ''RekeyBytes'' | [[ui_login_kex|Max data before rekey]] | | | ||
+ | | ''AuthKI'' | [[ui_login_authentication#gssapi|Attempt keyboard-interactive authentication]] | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''==AuthGSSAPI=='' | [[ui_login_authentication#gssapi|Attempt GSSAPI authentication]] | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''TryAgent'' | [[ui_login_authentication|Attempt Authentication Using Pageant]] | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''==LogicalHostName=='' | Logical name of remote host/GSSAPI/SSPI/Kerberos Service principal name/Server realm | | | ||
+ | | ''==SourceAddress=='' | Source IPv4 address (network interface) of outgoing SSH connection | | | ||
+ | | ''==GSSLibs=='' | Preference order of %%GSSAPI%% libraries | Comma ('','') separated list of ''gssapi32'', ''sspi'' and ''custom''. | | ||
+ | | ''GSSCustom'' | User-supplied %%GSSAPI%% library path | | | ||
+ | | ''FtpAccount'' | [[ui_login_ftp|FTP account]] | | | ||
+ | | ''==FtpForcePasvIp2=='' | [[ui_login_ftp|Force IP address for passive mode connections]] | ''0''/''on'' = On, ''1''/''off'' = Off, ''2''/''auto'' = Auto | | ||
+ | | ''==FtpUseMlsd=='' | [[ui_login_ftp|Use MLSD command for directory listing]] | ''0''/''on'' = On, ''1''/''off'' = Off, ''2''/''auto'' = Auto | | ||
+ | | ''==FtpListAll=='' | [[ui_login_ftp|Support for listing of hidden files]] | ''0''/''on'' = On, ''1''/''off'' = Off, ''2''/''auto'' = Auto | | ||
+ | | ''==FtpAnyCodeForPwd=='' | Allow any 2xx response code to FTP ''PWD'' command | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''==FtpWorkFromCwd=='' | Always change working directory before FTP commands. | ''0''/''on'' = On, ''1''/''off'' = Off, ''2''/''auto'' = Auto (use on VMS servers) | | ||
+ | | ''==S3CredentialsEnv=='' | [[ui_login#read_credentials|Credentials from AWS environment]] | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''Tunnel'' | [[tunneling|Connection tunneling]] | ''0''/''off'' = Disabled, ''1''/''on'' = 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 | | | ||
+ | | ''==TunnelLocalPortNumber=='' | [[ui_login_tunnel#tunnel_options|Local tunnel port]] | ''0'' = Autodetect | | ||
+ | | ''==Utf=='' | [[ui_login_environment#utf|UTF-8 Encoding for Filenames]] | ''0'' = Off, ''1'' = On, ''2'' = Auto | | ||
+ | | ''Shell'' | [[ui_login_scp#shell|Shell]] ([[scp|SCP protocol]]) | | | ||
+ | | ''==ListingCommand=='' | [[ui_login_scp#directory_listing|Listing command]] | | | ||
+ | | ''LookupUserGroups2'' | [[ui_login_scp#other_options|Lookup user groups]] | ''0''/''on'' = On, ''1''/''off'' = Off, ''2''/''auto'' = Auto | | ||
+ | | ''==LocalDirectory=='' | [[ui_login_directories|Local Directory]]((Note that //Remote Directory// can be set using [[session_url|session URL]], you do not need to use raw site settings for it.)) | | | ||
+ | | ''==TimeDifference=='' | [[ui_login_environment#timezone|Time zone offset]] | Hexadecimal representation of 64-bit IEEE 754 floating point number (double), representing the offset in days. \\ Example: ''555555555555A5BF'' = -1 hour((In C# you can calculate -1 hour offset using: ''%%string.Join("", BitConverter.GetBytes(TimeSpan.FromHours(-1).TotalDays).Select(b => b.ToString("X2")))%%''.)) | | ||
+ | | ''ConsiderDST'' | [[ui_login_environment#dst|Daylight Saving Time]] | ''0'' = Adjust remote timestamp with DST, ''1'' = Adjust remote timestamp to local conventions, ''2'' = Preserve remote timestamp | | ||
+ | | ''ResolveSymlinks'' | [[ui_login_directories#directory_reading_options|Resolve symbolic links]] | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''FollowDirectorySymlinks'' | [[ui_login_directories#directory_reading_options|Follow symbolic links to directories]] | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''==ExitCode1IsError=='' | Consider exit code 1 from [[remote_command|remote commands]] as an error. | ''0''/''off'' = Disabled, ''1''/''on'' = Enabled | | ||
+ | | ''==SftpServer=='' | Path to [[ui_login_sftp|SFTP server binary]] | For example ''sudo su -c /bin/sftp-server'' | | ||
+ | | ''SFTPMaxVersion'' | [[ui_login_sftp|Preferred SFTP protocol version]] | ''0''–''5'' = SFTP version number | | ||
+ | | ''==SFTPRealPath=='' | Canonicalize SFTP paths | ''0''/''on'' = On, ''1''/''off'' = Off, ''2''/''auto'' = Auto | | ||
+ | | ''MinTlsVersion'' | [[ui_login_tls|Minimum TLS/SSL version]] | ''3'' = SSL 3.0, ''10'' = TLS 1.0, ''11'' = TLS 1.1, ''12'' = TLS 1.2 | | ||
+ | | ''MaxTlsVersion'' | [[ui_login_tls|Maximum TLS/SSL version]] | See ''MinTlsVersion'' | | ||
+ | | ''==SendBuf=='' | [[ui_login_connection#connection|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 ''0'' to disable some of the optimizations, that unchecking the GUI option disables. | | ||
+ | | ''==EOLType=='' | [[ui_login_environment|End-of-line characters]] | ''0'' = LF, ''1'' = CRLF | | ||
+ | | ''==TrimVMSVersions=='' | [[ui_login_environment|Trim VMS Version Numbers]] | ''0''/''off'' = Off, ''1''/''on'' = On | | ||
+ | | ''==PostLoginCommands=='' | [[ui_login_ftp|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 [[ui_pref_editor_internal#display|global preferences]], ''0'' = ANSI encoding, ''65001'' = UTF-8 encoding. | | ||
+ | | ''==DeleteToRecycleBin=='' | [[ui_login_recycle_bin|Preserve deleted remote files to recycle bin]] | ''0''/''off'' = Off, ''1''/''on'' = On | | ||
+ | | ''OverwrittenToRecycleBin'' | [[ui_login_recycle_bin|Preserve overwritten remote files to recycle bin]] | ''0''/''off'' = Off, ''1''/''on'' = On | | ||
+ | | ''RecycleBinPath'' | [[ui_login_recycle_bin|Remote recycle bin]] | | | ||
+ | | ''==ProtocolFeatures=='' | Protocol features override | Comma-separated list of features override. If the list starts with ''*'', it completely overrides protocol features. If not, individual listed features should start with ''-'' or ''+'', to remove or add the feature. For SFTP protocol, it overrides SFTP extensions list. For FTP protocol, it overrides features declared by ''FEAT'' command response. | | ||
+ | |||
+ | ===== [[example]] Example ===== | ||
+ | For example to enable HTTP proxy, in [[scripting]]: | ||
+ | |||
+ | <code winscp> | ||
+ | open <session_url> -rawsettings ProxyMethod=3 ProxyHost=proxy | ||
+ | </code> | ||
+ | |||
+ | or in [[library|.NET assembly]] (using [[library_powershell|PowerShell]]): | ||
+ | |||
+ | <code powershell> | ||
+ | $sessionOptions.AddRawSettings("ProxyMethod", "3") | ||
+ | $sessionOptions.AddRawSettings("ProxyHost", "proxy") | ||
+ | </code> | ||
+ | |||
+ | ===== [[keywords]] Keywords ===== | ||
+ | |||
+ | For boolean settings that have values ''0'' for //Off/Disabled// and ''1'' for //On/Enabled// (like [[#authgssapi|''AuthGSSAPI'']]), you can use ''off'' and ''on'' keywords instead. | ||
+ | For settings that have values ''0'' for //On//, ''1'' for //Off// and ''2'' for //Auto// (like [[#ftpusemlsd|''FtpUseMlsd'']]), you can use ''on''/''off''/''auto'' keywords instead. | ||