Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ssis &引用;主机密钥无效';“t验证”;尽管在WinSCP命令行中添加了-hostkey开关_Ssis_Sftp_Winscp - Fatal编程技术网

Ssis &引用;主机密钥无效';“t验证”;尽管在WinSCP命令行中添加了-hostkey开关

Ssis &引用;主机密钥无效';“t验证”;尽管在WinSCP命令行中添加了-hostkey开关,ssis,sftp,winscp,Ssis,Sftp,Winscp,我正在尝试使用SSIS Execute process task和以下命令行参数建立SFTP连接 /log=G:\USER_DATA\USER_USER_SYNC\SFTP_LOG\user_sync_winscp.log /command "open sftp://username:password@stransfer.host.com/" "get /DATA/UserRoleUpdate.csv G:\USER_DATA\USER_USER_SYNC\Download\" "exit"

我正在尝试使用SSIS Execute process task和以下命令行参数建立SFTP连接

/log=G:\USER_DATA\USER_USER_SYNC\SFTP_LOG\user_sync_winscp.log /command "open sftp://username:password@stransfer.host.com/" "get /DATA/UserRoleUpdate.csv G:\USER_DATA\USER_USER_SYNC\Download\" "exit"
给定的执行进程任务使用WinSCP exe将文件下载到本地驱动器。包在调试模式下成功运行,并且在我通过SQL server上的SSIDB文件夹手动运行时也成功运行

我们在尝试使用作业代理执行SSIS包时遇到了一个问题。 若我禁用使SFTP连接的特定任务,那个么包也会通过作业代理成功运行。似乎它只是在具体的任务上有问题。 我正在努力理解为什么会发生这种情况,以及需要做些什么来解决这个问题

当我检查
user\u sync\u winscp.log
文件时,我发现了这个

. 2019-08-20 08:10:23.931 Host key fingerprint is:
. 2019-08-20 08:10:23.931 ssh-rsa 2048 9b:63:5e:c4:26:bb:35:0d:49:e6:74:5e:5a:48:c0:8a bLgYggTcP4U6A/IFkFoyfY8BhlCB/+i5fFhzq1z1MjQ=
. 2019-08-20 08:10:23.931 Asking user:
. 2019-08-20 08:10:23.931 **Continue connecting to an unknown server and add its host key to a cache?** . 2019-08-20 08:10:23.931 . 2019-08-20 08:10:23.931 The server's host key was not found in the cache. You have no guarantee that the server is the computer you think it is.
. 2019-08-20 08:10:23.931
. 2019-08-20 08:10:23.931 The server's RSA key details are:
. 2019-08-20 08:10:23.931 
. 2019-08-20 08:10:23.931     Algorithm:    ssh-rsa 2048
. 2019-08-20 08:10:23.931     SHA-256:  bLgYggTcP4U6A/IFkFoyfY8BhlCB/+i5fFhzq1z1MjQ=
. 2019-08-20 08:10:23.931     MD5:  9b:63:5e:c4:26:bb:35:0d:49:e6:74:5e:5a:48:c0:8a
. 2019-08-20 08:10:23.931
. 2019-08-20 08:10:23.931 If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
. 2019-08-20 08:10:23.931 In scripting, you should use a -hostkey switch to configure the expected host key. () . 2019-08-20 08:10:33.933 Attempt to close connection due to fatal exception:
* 2019-08-20 08:10:33.933 Host key fingerprint is ssh-rsa 2048 bLgYggTcP4U6A/IFkFoyfY8BhlCB/+i5fFhzq1z1MjQ=.
* 2019-08-20 08:10:33.933 (Exception) **Host key wasn't verified!** . 2019-08-20 08:10:33.933 Closing connection.
. 2019-08-20 08:10:33.933 Sending special code: 12
然后,我从日志文件复制了主机密钥,并通过添加开关
-hostkey=“…”
更改了命令行参数,如下所示

/log=G:\USER_DATA\USER_USER_SYNC\SFTP_LOG\user_sync_winscp.log /command "open sftp://username:password@stransfer.host.com/" -hostkey="ssh-rsa 2048 9b:63:5e:c4:26:bb:35:0d:49:e6:74:5e:5a:48:c0:8a" "get /DATA/UserRoleUpdate.csv G:\USER_DATA\USER_USER_SYNC\Download\" "exit"
现在任务本身在本地失败

请让我知道的情况下,我需要补充更多的细节这一点。谢谢

正确的语法是:

... /command "open sftp://username:password@stransfer.host.com/ -hostkey=""ssh-rsa 2048 9b:63:5e:c4:26:bb:35:0d:49:e6:74:5e:5a:48:c0:8a""" "get ..." ...
请参阅WinSCP和



WinSCP GUI可以为您提供,包括。

。非常感谢。我是新来的东西,并努力了很多来解决这个问题,我很高兴,该软件包是通过工作代理运行。没有问题。我运行了好几次。:-)如果我希望从同一个sftp位置文件夹下载多个不同名称的文件,是否可以在命令行参数中指定多个文件名。请让我知道。我将分享细节,并就此提出一个新问题。