1
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.
Hi Thanks. I have figured out (from this forum) that winSCP does not support automation at all. I used pageant to hold the Public key and now it can authenticate and create a session. However, I am getting the following error:Reading Remote Directory: Error changing directory to '/script=E:\Data\GmousCR12\bin\Get.sftp' Cannot get real path for '/script=E:\Data\GmousCR12\bin\Get.sftp' No such file or directory. Error code. 2 Error message from Server: No Such file Request code: 16 Session started. Active Session: [1] username@ipaddress The file exist on another E drive of the same server. – Aman – 2013-02-08T13:07:39.733