Differences

This shows you the differences between the selected revisions of the page.

2014-07-28 2014-07-28
-privatekey/passphrase is for sftp/scp only (martin) 5.6 bug 160 webdav (martin)
Line 19: Line 19:
| ''-timeout=<sec>''          | Server response timeout | | ''-timeout=<sec>''          | Server response timeout |
| ''%%-hostkey="<fingerprint>"%%'' | Specifies fingerprint of expected [[ssh_verifying_the_host_key|SSH host key]] (or several alternative fingerprints separated by semicolon). It makes WinSCP automatically [[scripting#hostkey|accept host key]] with the fingerprint. As the host key fingerprint contains spaces you need to surround it by quotes. //Learn how to [[faq_script_hostkey|obtain host key fingerprint]]//. \\ In exceptional situations, when security is not required, you can use value ''*'' to accept any host key. In this case, script output and log file will include warning about insecure connection. \\ [[SFTP]] and [[SCP]] protocols only. | | ''%%-hostkey="<fingerprint>"%%'' | Specifies fingerprint of expected [[ssh_verifying_the_host_key|SSH host key]] (or several alternative fingerprints separated by semicolon). It makes WinSCP automatically [[scripting#hostkey|accept host key]] with the fingerprint. As the host key fingerprint contains spaces you need to surround it by quotes. //Learn how to [[faq_script_hostkey|obtain host key fingerprint]]//. \\ In exceptional situations, when security is not required, you can use value ''*'' to accept any host key. In this case, script output and log file will include warning about insecure connection. \\ [[SFTP]] and [[SCP]] protocols only. |
-| ''%%-certificate="<fingerprint>"%%'' | Specifies fingerprint of expected [[ftps#certificate|TLS/SSL certificate]] (or several fingerprints separated by semicolon). It makes WinSCP automatically [[scripting#hostkey|accept certificate]] with the fingerprint. \\ In exceptional situations, when security is not required, you can use value ''*'' to accept any certificate. In this case, script output and log file will include warning about insecure connection. \\ [[ftps|FTPS]] protocol only. |+| ''%%-certificate="<fingerprint>"%%'' | Specifies fingerprint of expected [[ftps#certificate|TLS/SSL certificate]] (or several fingerprints separated by semicolon). It makes WinSCP automatically [[scripting#hostkey|accept certificate]] with the fingerprint. \\ In exceptional situations, when security is not required, you can use value ''*'' to accept any certificate. In this case, script output and log file will include warning about insecure connection. \\ [[ftps|FTPS]] and [[webdav|WebDAVS]] protocol only. |
| ''-passive=on%%|%%off''                | Enables [[ui_login_connection#connection|passive]] (''=on'') or active (''=off'') transfer mode ([[FTP]] protocol only). | | ''-passive=on%%|%%off''                | Enables [[ui_login_connection#connection|passive]] (''=on'') or active (''=off'') transfer mode ([[FTP]] protocol only). |
| ''-implicit''                | Implicit TLS/SSL ([[ftps|FTPS protocol]] only) | | ''-implicit''                | Implicit TLS/SSL ([[ftps|FTPS protocol]] only) |
Line 51: Line 51:
When [[library_from_script|converting script to .NET Assembly]], map ''open'' command to ''[[library_session_open|Session.Open]]'' method. The ''Session.Open'' accepts instance of ''[[library_sessionoptions|SessionOptions]]'' class, which needs to be populated according to parameters and switches of ''open'' command. When [[library_from_script|converting script to .NET Assembly]], map ''open'' command to ''[[library_session_open|Session.Open]]'' method. The ''Session.Open'' accepts instance of ''[[library_sessionoptions|SessionOptions]]'' class, which needs to be populated according to parameters and switches of ''open'' command.
-Parameters mapping: [[session_url|Session URL]] in command parameter ''session_url'' needs to be separated to its components, which are to be stored into ''SessionOptions.HostName'' (''host'' component), ''SessionOptions.UserName'' (''username''), ''SessionOptions.Password'' (''password''), ''SessionOptions.PortNumber'' (''port'') and ''SessionOptions.Protocol'' (''sftp|ftp|ftps|scp://'').+Parameters mapping: [[session_url|Session URL]] in command parameter ''session_url'' needs to be separated to its components, which are to be stored into ''SessionOptions.HostName'' (''host'' component), ''SessionOptions.UserName'' (''username''), ''SessionOptions.Password'' (''password''), ''SessionOptions.PortNumber'' (''port'') and ''SessionOptions.Protocol'' (''sftp|ftp|ftps|http|https|scp:%%//%%''((For ''https:%%//%%'', use ''SessionOptions.Protocol = Protocol.Webdav'' and ''SessionOptions.WebdavSecure = true''.))).
There is no direct mapping for opening stored site using ''site'' parameter, because .NET assembly [[library_from_script#default_config|does not share configuration]] with graphical/scripting mode. You need to configure all your site settings directly in your code (using ''[[library_sessionoptions|SessionOptions]]'' class). There is no direct mapping for opening stored site using ''site'' parameter, because .NET assembly [[library_from_script#default_config|does not share configuration]] with graphical/scripting mode. You need to configure all your site settings directly in your code (using ''[[library_sessionoptions|SessionOptions]]'' class).

Last modified: by martin