Differences

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

2021-07-21 2022-01-11
mapping * and acceptnew (martin) 5.20.1 Bug 2044: Provide private key as string in .NET assembly (martin)
Line 17: Line 17:
Switches: Switches:
^ Switch          ^ Description ^ ^ Switch          ^ Description ^
-| ''-==privatekey===%%<file>%%''        | [[public_key#private|SSH private key]] path. \\ [[SFTP]] and [[SCP]] protocols only. |+| ''-==privatekey===%%<file>%%''        | [[public_key#private|SSH private key]] path. \\ Alternatively a hex dump or SSH private key file contents prefixed with ''@''. &beta_feature \\ [[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. Use SHA-256 fingerprint of the host key. As the host key fingerprint contains spaces you need to surround it by quotes. //Learn how to [[faq_hostkey|obtain host key fingerprint]]//. \\ Use the ''acceptnew'' keyword instead of the ''fingerprint'' to make WinSCP automatically accept host key of new hosts. When this is combined with [[config#no|no configuration mode]], it forces use of registry for the host key cache. \\ 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. Use SHA-256 fingerprint of the host key. As the host key fingerprint contains spaces you need to surround it by quotes. //Learn how to [[faq_hostkey|obtain host key fingerprint]]//. \\ Use the ''acceptnew'' keyword instead of the ''fingerprint'' to make WinSCP automatically accept host key of new hosts. When this is combined with [[config#no|no configuration mode]], it forces use of registry for the host key cache. \\ 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. |
| ''-==clientcert===%%<file>%%''      | [[tls#client_certificate|TLS/SSL client certificate]] path. \\ [[ftps|FTPS]] and [[webdav|WebDAVS]] protocols only. | | ''-==clientcert===%%<file>%%''      | [[tls#client_certificate|TLS/SSL client certificate]] path. \\ [[ftps|FTPS]] and [[webdav|WebDAVS]] protocols only. |
Line 65: Line 65:
Switches mapping: Switches mapping:
^ Switch                  ^ Mapping ^ ^ Switch                  ^ Mapping ^
-| ''-privatekey''    | Set ''[[library_sessionoptions#sshprivatekeypath|SessionOptions.SshPrivateKeyPath]]''. |+| ''-privatekey''    | When the value is an SSH private key path, set ''[[library_sessionoptions#sshprivatekeypath|SessionOptions.SshPrivateKeyPath]]''. \\ When the value is a hex dump of SSH private key file contents, store the contents (not the hex dump) to ''[[library_sessionoptions#sshprivatekey|SessionOptions.SshPrivateKey]]''. |
| ''-hostkey''      | Set ''[[library_sessionoptions#sshhostkeyfingerprint|SessionOptions.SshHostKeyFingerprint]]''. \\ For special values ''*'' and ''acceptnew'', set [[library_sessionoptions#sshhostkeypolicy|''SessionOptions.SshHostKeyPolicy'']] to ''SshHostKeyPolicy.GiveUpSecurityAndAcceptAny'' or ''SshHostKeyPolicy.AcceptNew'', respectively. | | ''-hostkey''      | Set ''[[library_sessionoptions#sshhostkeyfingerprint|SessionOptions.SshHostKeyFingerprint]]''. \\ For special values ''*'' and ''acceptnew'', set [[library_sessionoptions#sshhostkeypolicy|''SessionOptions.SshHostKeyPolicy'']] to ''SshHostKeyPolicy.GiveUpSecurityAndAcceptAny'' or ''SshHostKeyPolicy.AcceptNew'', respectively. |
| ''-clientcert''    | Set ''[[library_sessionoptions#tlsclientcertificatepath|SessionOptions.TlsClientCertificatePath]]''. | | ''-clientcert''    | Set ''[[library_sessionoptions#tlsclientcertificatepath|SessionOptions.TlsClientCertificatePath]]''. |

Last modified: by martin