1

I am using SSIS 2016 to do some SFTPtasks using WinSCP.I am getting the error "Process exit code was 0 while expecting 1".Here is my WinSCP script

option batch abort option confirm off open sftp://user:password@server:22 close exit.

If I run this connection only in WINSCP.com it gives the below error while connecting. If you trust this host, press Yes. To connect without adding host key to the cac he, press No. To abandon the connection press Cancel. In scripting, you should use a -hostkey switch to configure the expected host ke y. (Y)es, (N)o, C(a)ncel, (C)opy Key, (P)aste key:

If I press Yes ,it works the next time I run the packge,because host key gets stored in cache,as per my understanding. But while running the script through SQL Job or package there is no option of giving any input when the message pops in.

IS there a way to avoid this message popup while connecting to the server through winscp cmd for the first time. By default can it connect without storing the host key in the cache? Can we connect directly without using host key in the connection string?

Al Jam
  • 35
  • 1
  • 3
  • 11

0 Answers0