Windows services 使用pscp.exe时跳过主机检查

Windows services 使用pscp.exe时跳过主机检查,windows-services,windows-2003-webserver,pscp,Windows Services,Windows 2003 Webserver,Pscp,我们有一个Windows服务在默认Windows本地系统帐户下运行。此服务尝试使用pscp.exe将文件传输到服务器。这正是我们发出的命令: pscp.exe -batch -r -q -v -l **** -pw **** C:/temp/test my-server-host-name:/bnrr2p3 注意使用--batch选项可以避免任何提示。现在,由于服务器名称未添加到已知主机列表中,因此此操作失败,错误如下: Looking up host "my-server-host-name

我们有一个Windows服务在默认Windows本地系统帐户下运行。此服务尝试使用pscp.exe将文件传输到服务器。这正是我们发出的命令:

pscp.exe -batch -r -q -v -l **** -pw **** C:/temp/test my-server-host-name:/bnrr2p3
注意使用--batch选项可以避免任何提示。现在,由于服务器名称未添加到已知主机列表中,因此此操作失败,错误如下:

Looking up host "my-server-host-name"
Connecting to 10.89.3.108 port 22
Server version: SSH-2.0-Sun_SSH_1.1.4
Using SSH protocol version 2
We claim version: SSH-2.0-PuTTY_Release_0.62
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 10:a8:36:6a:be:99:2c:e0:1c:18:80:28:c8:e5:dd:9b
Connection abandoned.
Disconnected: User aborted at host key verification
Lost connection
谷歌表示,我需要先手动登录到该服务器,然后将该服务器添加到列表中。如果我以特定用户的身份运行,我可以这样做


如何使其适用于Windows本地系统帐户?

在命令提示符下使用PsExec.exe-I-s cmd。新命令提示符将以系统默认帐户打开。手动运行该命令并接受主机密钥一次