Topic "Automatiopn of WINSCP with Private Key is not working"

Author Message
vvk1986

Guest


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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Please start again using this guide:
http://winscp.net/eng/docs/guide_automation
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License