Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Issue resolved


The issue is resolved.
By mistake I was trying to mention the hostkey in winscp command. I tried using hostkey switch in open command and it worked.

Thank you. :)

Unable to connect SFTP server


I have created a program which creates the WinSCP script. as shown below

option batch abort

option confirm off
option transfer binary
open s -privatekey=C:\temp\workarea\SFTP\Auth.ppk -passphrase="pass1234"
get -preservetime -resumesupport=on /home/USERNAME/test.txt C:\temp\workarea\SFTP\test.txt

I execute this program by from other application as below

C:\Program Files (x86)\WinSCP\ /script=C:\temp\workarea\SFTP\WinSCPScript.txt /hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"  /log=C:\temp\workarea\SFTP\log.txt /loglevel=*

But I am facing problem opening connection to the server. I have attached the log file.
Can anyone please help me to know how can I approach to solve this issue.
After reading the log file I thought it is some issue with the hostkey, but after checking with administrator I found it is same.

Thank you. Kind Regards, Rahul