Unable to connect SFTP server

Advertisement

rahul.kolhe22
Joined:
Posts:
3

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

Reply with quote

Advertisement

rahul.kolhe22
Joined:
Posts:
3

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

Reply with quote

Advertisement

You can post new topics in this forum