我试图从一个网页启动另一台服务器上的perl脚本,我遇到了plink的问题:它似乎没有在从IUSR_用户运行时记住主机密钥。plink的主机密钥没有缓存在注册表中,当从IIS上运行Perl/Windows
我设法减少的问题是:
print "Content-Type:text/plain\n\n";
open(PLINK, "| \"C:\\Program Files\\PuTTY\\plink.exe\" -pw sanitized Administrator\@serveurftp.a.b.c whoami") or die "Can't fork: $!";
sleep(1);
print PLINK "y\n";
close(PLINK);
当调用从网页上这个剧本,我总是得到这样的:
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 2048 cb:eb:dc:1b:9e:1c:6b:fa:63:fb:2e:ba:2c:61:26:c4
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) serveurftp\administrator
我只应在第一时间得到这个,之后只有“serveurftp \ administrator”,但它看起来像plink在从IIS运行时不能存储主机密钥。
你们有什么想法解决这个问题吗?
你知道我该怎么做#1吗?在Unix上,我会做“sudo -u用户plink ...”,但我不知道在Windows上如何做到这一点... – 2011-02-02 18:57:25
转到开始>>所有程序>>附件,然后右键单击“命令提示符”。选择“以管理员身份运行”或“以...身份运行” – mob 2011-02-02 20:16:20