I am trying to set up a batch file for an automated transaction, however my tests have so far failed.
I have the public key of the server where the connection is made. It has been saved as a .pkk file and imported into WinSCP.
I have logged the results in text file, and this reads as below:
Username: 4m4nseth (Password: No, Key File: No)
The key file is there but WinSCP for some reason doesn't pick it up.
If running as a batch file I get the following message:
Session name: 4m4nseth@IP Address Host name: IP Address (Port: 22) User name: 4m4nseth (Password: No, Key file: No) Tunnel: No Transfer Protocol: SFTP (SCP) Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
But the following if running in the WinSCP
Session name: 4m4nseth@ipaddress Host name: ipaddress (Port: 22) User name: 4m4nseth (Password: No, Key file: Yes) Tunnel: No Transfer Protocol: SFTP (SCP)
As you can see the key file is saved but when running as batch command it does not recognize.