Differences

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

2021-06-17 2023-10-06
5.17 is not recent anymore (martin) prefer using -password for -pw conversion, because it does not need URL encoding (martin)
Line 17: Line 17:
| ''-l user'' | Specify the username in a [[session_url|session URL]] in an ''[[scriptcommand_open|open]]'' command in the script. \\ Example: ''open %%sftp://user@example.com/%%'' | | ''-l user'' | Specify the username in a [[session_url|session URL]] in an ''[[scriptcommand_open|open]]'' command in the script. \\ Example: ''open %%sftp://user@example.com/%%'' |
| ''-P port'' | Specify the port number in a [[session_url|session URL]] in an ''[[scriptcommand_open|open]]'' command in the script. \\ Example: ''open %%sftp://example.com:port/%%'' | | ''-P port'' | Specify the port number in a [[session_url|session URL]] in an ''[[scriptcommand_open|open]]'' command in the script. \\ Example: ''open %%sftp://example.com:port/%%'' |
-| ''-pw passw'' | Specify the password in a [[session_url|session URL]] in an ''[[scriptcommand_open|open]]'' command in the script. \\ Example: ''open %%sftp://user:passw@example.com/%%'' |+| ''-pw passw'' | Specify the password using ''[[scriptcommand_open#password|-password]]'' switch in an ''[[scriptcommand_open|open]]'' command in the script. \\ Example: ''open %%sftp://user@example.com/%% -password=passw'' |
| ''-i key'' | Specify the private key using ''[[scriptcommand_open#privatekey|-privatekey]]'' switch in an ''[[scriptcommand_open|open]]'' command in the script. \\ Example: ''open %%sftp://user@example.com/%% -privatekey=key'' | | ''-i key'' | Specify the private key using ''[[scriptcommand_open#privatekey|-privatekey]]'' switch in an ''[[scriptcommand_open|open]]'' command in the script. \\ Example: ''open %%sftp://user@example.com/%% -privatekey=key'' |
| ''%%-hostkey aa:bb:cc:...%%'' | Specify the expected hostkey using ''[[scriptcommand_open#hostkey|-hostkey]]'' switch in an ''[[scriptcommand_open|open]]'' command in the script. With WinSCP, you should include key type and size in the signature. While they are not required, it is still recommended to add them as otherwise WinSCP may choose to use a different (better) host key algorithm and the checksum will not match (the same is actually true for PSFTP). \\ Example: ''%%open sftp://user@example.com/ -hostkey="ssh-rsa 2048 aa:bb:cc:...%%"'' \\ (assuming 2048-bit RSA host key) \\ See also [[#hostkey|Verifying the host key]] section below.  | | ''%%-hostkey aa:bb:cc:...%%'' | Specify the expected hostkey using ''[[scriptcommand_open#hostkey|-hostkey]]'' switch in an ''[[scriptcommand_open|open]]'' command in the script. With WinSCP, you should include key type and size in the signature. While they are not required, it is still recommended to add them as otherwise WinSCP may choose to use a different (better) host key algorithm and the checksum will not match (the same is actually true for PSFTP). \\ Example: ''%%open sftp://user@example.com/ -hostkey="ssh-rsa 2048 aa:bb:cc:...%%"'' \\ (assuming 2048-bit RSA host key) \\ See also [[#hostkey|Verifying the host key]] section below.  |
Line 36: Line 36:
<code winscp> <code winscp>
-open sftp://martin:password@example.com/ -hostkey="ssh-rsa 2048 aa:bb:cc:..."+open sftp://martin@example.com/ -password=password -hostkey="ssh-rsa 2048 aa:bb:cc:..."
</code> </code>

Last modified: by martin