Authentication using a "Passphrase" for a private key.
Hello, I am trying to automate a secure file copy with WinSCP using private and public keys for authentication. I can get it to work if I use the passphrase in the command but I want to pull the passphrase from a txt file.
The batch file is simple:
The script is:
It works perfectly if I have the actual passphrase but if I try
Can someone help with the actual command to get the passphrase from a text file please? I have formatted the file UTF-8.
Thanks in advance
The batch file is simple:
cd\ "c:\Program Files (x86)\WinSCP\WinSCP.exe" /log=c:\test\app.log /ini=nul /script=C:\test\app.txt
open sftp://user@testsite.com:2022 -hostkey="ssh-randomcharaters" -privatekey="C:\Program Files (x86)\WinSCP\private.ppk" -passphrase="actual passphrase" cd /temp/test put c:\test\testfile.csv
-passwordsfromfiles
, I cannot get it to work. Authentication fails...
Can someone help with the actual command to get the passphrase from a text file please? I have formatted the file UTF-8.
Thanks in advance