<
ter0...@gmail.com> wrote:
> I've noticed that, when run, pscp stores its cache in
> ~/.putty/sshhostkeys.
[...]
> However, the application I'm working with uses pscp in batch mode. So,
> when the prompt comes up to verify a host key, it automatically fails
> because batch mode fails on interactive prompts.
>
> My question is how do I tell pscp in batch mode to permanently accept
> that key? Does PuTTY on Linux store another, global cache somewhere
> that it can read?
No, it _should_ still use the same cache file whether it's in batch or
interactive mode. If it isn't working for you, that's something we
should try to debug.
Are you running the batch-mode pscp in the same environment as the
test interactive one? If you run as a different user or change $HOME,
then the location of the sshhostkeys file will also change. Users can
also set $PUTTYDIR to read configuration from somewhere else.
If you run pscp -batch under strace, can you see in the trace where
it's trying to open a host key file, and check it's finding the right
one?
If you use the -v flag in both the batch and interactive runs, do they
report the same host key fingerprint?
--
Simon Tatham "_shin_, n. An ingenious device for
<
ana...@pobox.com> finding tables and chairs in the dark."