login about faq

Hi all,

Hoping someone may help.

We're transferring files from a Unix box via scpg3. We've already saved the hostkeys for that host and when running the script interactively, it is okay but when we ran the same script via a batch/scheduler somehow it's unable to see the hostkey locations/path (scpg3 -B). With a "hostkey not accepted" error. I confirm that in both interactive and batch - it is running under the same account. We ran both in debug, and this entry is in particular is probably what causes the problem:

( Note we have no issue with the public key interactively)


SshFile/sshfile.c:686: Open file=C:\Users\username\AppData\Roaming\SSH\hostkeys\salt class=buildin-1[1]


SshHostkeyDigest/sshhostkeydigest.c:158: Trying salted file path: C:\Users\username\AppData\Roaming\SSH\hostkeys\keys_xxxxxxxxxxxxxxxxxxxxxxxxx .


SshFile/sshfile.c:686: Open file=C:\Program Files (x86)\SSH Communications Security\SSH Tectia\SSH Tectia AUX\ssh-broker-ng\af-hostkeycheck.xml class=buildin-3[3]


LOG EVENT (normal,warning): 1000 KEX_failure, "Server's hostkey not accepted", Session-Id: 6

In the batch, not a single entry in the debug log indicates that it read any of the hostkeys and public keys for the user. Somehow we suspect that user environment variables may not be set when the scheduler runs the script or scpg3 behaves differently. When we dumped the variables they seem to be intact. Also there is no existing broker or leftover/zombie brokers, scpg3, sshg3 running at all when the batch runs (otherwise the error is "waiting for another user to complete hostkey query" - although this can happen with a stuck scpg3 because it can't see the hostkeys so scpg3 -B is used)



asked Mar 25 '15 at 17:24

lmhang's gravatar image


Can you run sshg3 user@server echo "hello" under the same account as a batch job? Are you able to run it? If not, what error messages you do you get? If not, can you run sshg3 --hostkey-policy=tofu user@server echo "hello" as a batch job?


answered Aug 31 '15 at 10:00

shuqinLKatSupport's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 25 '15 at 17:24

Seen: 5,812 times

Last updated: Aug 31 '15 at 10:00

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.