响应 y(es) psftp 主机密钥提示 [英] Respond y(es) to psftp host key prompt

查看:92
本文介绍了响应 y(es) psftp 主机密钥提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在以编程方式创建脚本文件并调用 psftp.exe 如下:

I am creating a script file programmatically and call psftp.exe as follows:

psftp user@hostname.com -pw password -b psftpscript.txt

但它提示用户输入

服务器的主机密钥未缓存在注册表中.你没有保证服务器是您认为的计算机.这服务器的 rsa2 密钥指纹是:[ssh-rsa 1024 somekey]如果你相信这个主机,输入y"将密钥添加到PuTTY的缓存中并继续连接.如果您只想继续连接一次,而无需将密钥添加到缓存中,输入n".如果您不信任此主机,按回车键放弃连接.将密钥存储在缓存中?(是/否)

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 somekey] 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)

我需要它是完全免费的、自动的.我试过 -batch 参数,但它只是放弃了连接

I need it to be completely prompt free, automatic. I tried -batch parameter but it just abandons the connection

推荐答案

我最终通过在提示中输入 'y' 将密钥添加到缓存中.我只需要做一次,之后就没有提示了,效果很好.

I ended up adding the key to cache by entering 'y' to the prompt. I had to do it only once, and after that no more prompts, it works good.

这篇关于响应 y(es) psftp 主机密钥提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆