Post a reply

Options
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)

Options

Topic review

rahul.kolhe22

Issue resolved

Hi,

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. :)
rahul.kolhe22

Unable to connect SFTP server

Hi,

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

option batch abort

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


I execute this program by from other application as below

C:\Program Files (x86)\WinSCP\WinSCP.com /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