Differences

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

2016-01-06 2016-01-06
correcting executable name again (martin) 5.8 Bug 1331 Command-line interface for converting and editing private keys (martin)
Line 22: Line 22:
winscp.exe [/rawconfig config1=value1 config2=value2 ...] winscp.exe [/rawconfig config1=value1 config2=value2 ...]
winscp.exe /batchsettings <site_mask> setting1=value1 setting2=value2 ... winscp.exe /batchsettings <site_mask> setting1=value1 setting2=value2 ...
 +winscp.exe /keygen keyfile [/output=output] [/changepassphrase] [/comment=comment]
winscp.exe /update winscp.exe /update
winscp.exe /help winscp.exe /help
Line 33: Line 34:
winscp.com [/rawconfig config1=value1 config2=value2 ...] winscp.com [/rawconfig config1=value1 config2=value2 ...]
winscp.com /batchsettings <site_mask> setting1=value1 setting2=value2 ... winscp.com /batchsettings <site_mask> setting1=value1 setting2=value2 ...
 +winscp.com /keygen keyfile [/output=output] [/changepassphrase] [/comment=comment]
winscp.com /help winscp.com /help
</code> </code>
Line 141: Line 143:
winscp.exe /batchsettings clients/* ProxyMethod=3 ProxyHost=proxy winscp.exe /batchsettings clients/* ProxyMethod=3 ProxyHost=proxy
</code> </code>
 +
 +==== [[keygen]] Private key conversion and modification ====
 +
 +Use the ''/keygen'' switch to convert [[public_key#private|private keys]] from other formats to a PuTTY ''.ppk'' format or to change their passphrase or comment.
 +
 +A parameter after the ''/keygen'' switch specifies a path to an input private key file. The input key can be in OpenSSH or ssh.com format (when converting the key to the PuTTY format) or in the PuTTY format (when changing a key passphrase or comment).
 +
 +When converting the key from other format, you need to specify an output key path using the ''/output'' switch. When modifying a PuTTY key, the existing file is overwritten, if ''/output'' is not specified.
 +
 +Use ''/changepassphrase'' switch to change the key passphrase.
 +
 +Use ''/comment'' switch to change the key comment.
 +
 +<code batch>
 +winscp.com /keygen mykey.pem /output=mykey.ppk /comment="Converted from OpenSSH format"
 +</code>
 +
 +<code batch>
 +winscp.com /keygen mykey.ppk /changepassphrase
 +</code>
 +
 +For a compatibility with *nix ''[[http://linux.die.net/man/1/puttygen|puttygen]]'', the ''-o'', ''-P'' and ''-C'' switches are understood as aliases to ''/output'', ''/changepassphrase'' and ''/comment'' respectively. So, for features supported by WinSCP, you can use the same arguments as for ''puttygen'', just prefixed with ''/keygen'':
 +
 +<code batch>
 +winscp.com /keygen mykey.pem -o mykey.ppk -c "Converted from OpenSSH format"
 +</code>
 +
==== Auxiliary ==== ==== Auxiliary ====

Last modified: by martin