One line to change password "WinSCP.com /key gen key.ppk /changepassphrase"

Advertisement

cmoran
Guest

One line to change password "WinSCP.com /key gen key.ppk /changepassphrase"

Hi all, I am trying to change the passphrase for a .ppk file.
I can change the password using CMD as Administrator by running the command "WinSCP.com /key gen key.ppk /changepassphrase", then entering the password twice.

I wish to do the above with a script, is there a way to set the password in one line?

I have tried a few things similar to below in a batch script but had no luck.
WinSCP.com /key gen key.ppk /changepassphrase
Password
Password

Can anyone point me in the right direction?

#Please not i had to split key gen as it is caught by the spam filter

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: One line to change password "WinSCP.com /key gen key.ppk /changepassphrase"

You can use this (undocumented) syntax:
WinSCP.com /keygen key.ppk /passphrase=old /changepassphrase=new

Reply with quote

Advertisement

You can post new topics in this forum