Differences

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

2023-01-03 2023-02-10
typo (martin) 6.0 Bug 2102: Reading password from a file (martin)
Line 19: Line 19:
winscp.exe [mysession] [/clientcert=<file> [/passphrase=<passphrase>]] winscp.exe [mysession] [/clientcert=<file> [/passphrase=<passphrase>]]
winscp.exe [mysession] [/certificate=<fingerprint>] winscp.exe [mysession] [/certificate=<fingerprint>]
 +winscp.exe [mysession] [/passwordsfromfiles]
winscp.exe [mysession] [/passive[=on|off]] [/implicit|explicit] winscp.exe [mysession] [/passive[=on|off]] [/implicit|explicit]
winscp.exe [mysession] [/timeout=<sec>] winscp.exe [mysession] [/timeout=<sec>]
Line 60: Line 61:
If there's already idle WinSCP instance running, the session(s) opens in the existing instance. To force session open in new instance of WinSCP, use ''/==newinstance=='' parameter. If there's already idle WinSCP instance running, the session(s) opens in the existing instance. To force session open in new instance of WinSCP, use ''/==newinstance=='' parameter.
-The parameter ''/privatekey'' specifies a [[local_path|local path]] to an [[public_key#private|SSH private key file]]. If the key file is encrypted, use the ''/passphrase'' to specify its passphrase.+The parameter ''/==privatekey=='' specifies a [[local_path|local path]] to an [[public_key#private|SSH private key file]]. If the key file is encrypted, use the ''/passphrase'' to specify its passphrase. The passphrase [[#passwordsfromfiles|can be read from a file]].
The parameter ''/hostkey'' specifies the fingerprint of the expected SSH host key (or several alternative fingerprints separated by a semicolon). It makes WinSCP automatically [[ssh_verifying_the_host_key|accept the host key]] with the fingerprint. The parameter ''/hostkey'' specifies the fingerprint of the expected SSH host key (or several alternative fingerprints separated by a semicolon). It makes WinSCP automatically [[ssh_verifying_the_host_key|accept the host key]] with the fingerprint.
-You can use the parameters ''/==username=='' and ''/password'' as an alternative way to specify the credentials.  The credentials are normally part of the [[session_url|session URL]]. Using these switches has the advantage of not needing to [[session_url#special|URL-encode special characters]].+You can use the parameters ''/==username=='' and ''/password'' as an alternative way to specify the credentials.  The credentials are normally part of the [[session_url|session URL]]. Using these switches has the advantage of not needing to [[session_url#special|URL-encode special characters]]. The password [[#passwordsfromfiles|can be read from a file]].
The parameter ''/clientcert'' specifies a [[local_path|local path]] to FTPS or WebDAVS [[tls#client_certificate|TLS/SSL client certificate]]. If the certificate is encrypted, use the ''/passphrase'' to specify its passphrase. The parameter ''/clientcert'' specifies a [[local_path|local path]] to FTPS or WebDAVS [[tls#client_certificate|TLS/SSL client certificate]]. If the certificate is encrypted, use the ''/passphrase'' to specify its passphrase.
When a FTPS or WebDAVS server [[tls#certificate|TLS/SSL certificate]] is not trusted (typically a self-signed certificate), use the parameter ''/certificate'' to specify the fingerprint of the untrusted certificate. It makes WinSCP trust the certificate. Several alternative fingerprints can be separated by a semicolon. When a FTPS or WebDAVS server [[tls#certificate|TLS/SSL certificate]] is not trusted (typically a self-signed certificate), use the parameter ''/certificate'' to specify the fingerprint of the untrusted certificate. It makes WinSCP trust the certificate. Several alternative fingerprints can be separated by a semicolon.
 +
 +With parameter ''/==passwordsfromfiles=='', the values of [[#username|''/password'']], [[#privatekey|''/passphrase'']] and in general all passwords from all sources are interpreted as paths to files, where the actual passwords are read from. The files must use UTF-8 or UTF-16 encoding.((With UTF-8 encoding use of BOM is optional. With UTF-16 the BOM is mandatory. Only the first line of the file is considered. Use of more lines is reserved for the future.)) &beta_feature
The parameter ''/passive'' enables a [[ui_login_connection#connection|passive]] (''=on'') or an active (''=off'') transfer mode ([[FTP]] protocol only). The parameter ''/passive'' enables a [[ui_login_connection#connection|passive]] (''=on'') or an active (''=off'') transfer mode ([[FTP]] protocol only).

Last modified: by martin