Passing hostkey (sftp) as environment variable is not possible in batch scripting
Hello
i would like to pass the hostkey through environment variable in batch scripting, like it is explained in
https://winscp.net/eng/docs/guide_protecting_credentials_for_automation
for passing the user/password-credentials ("Using WinSCP scripting")
The following line in example script (example.txt) does not work
open sFtp://%PAR_1%:%PAR_2%@IP:Port/ -hostkey=%PAR_3%
open sFtp://%PAR_1%:%PAR_2%@IP:Port/ -hostkey="%PAR_3%" does not work either
The credentials and the hostkey are set as environment-variables (PAR_1, PAR_2, PAR_3) before the script is executed.
It seems that the environment variable for the hostkey is not resolved but the user and password variables are resolved.
Does anybody no if there is a way to pass the hostkey?
The Version of Winscp.exe is 5.7.4.5553
Thanks
i would like to pass the hostkey through environment variable in batch scripting, like it is explained in
https://winscp.net/eng/docs/guide_protecting_credentials_for_automation
for passing the user/password-credentials ("Using WinSCP scripting")
The following line in example script (example.txt) does not work
open sFtp://%PAR_1%:%PAR_2%@IP:Port/ -hostkey=%PAR_3%
open sFtp://%PAR_1%:%PAR_2%@IP:Port/ -hostkey="%PAR_3%" does not work either
The credentials and the hostkey are set as environment-variables (PAR_1, PAR_2, PAR_3) before the script is executed.
It seems that the environment variable for the hostkey is not resolved but the user and password variables are resolved.
Does anybody no if there is a way to pass the hostkey?
The Version of Winscp.exe is 5.7.4.5553
Thanks