Automatiopn of WINSCP with Private Key is not working

Advertisement

vvk1986
Guest

Automatiopn of WINSCP with Private Key is not working

Hi Freinds,

I need your help. Kindly review the below code which I had written

------------------------------------------------------------------------
@Echo on

log "C:\test\" "C:\Program Files\WinSCP\WinSCP.exe" testsecure.testcloud.com:22 -user="rest2" -privatekey="C:\Program Files\WinSCP\PuTTY\SFTPKEY\rest.ppk" -hostKey="ssh-rsa 1024 c1:43:fb:34:d9:05:XX:81:d3:XX:15:8a:69:4a:7b:81" "put C:\test\test.txt"

-----------------------------------------------------
My task is to connect to target server through WINSCP and put a test.txt file onto server.

Issue: When I execute the batch script the first issue is that it is asking for user ID every time . When I provide "rest2" it will open the server session but will never put the file onto target server.

Log file just provides an open blank text file with success in the file name.

Kindly help me as I am new to WINSCP and I need this work to be completed for my project delivery.

Thank you for your help

Vinay
live4vinay@gmail.com

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum