The server's host key not found in the cache. sporadic issue

Advertisement

Lalit Kukreja
Joined:
Posts:
2
Location:
Lalit Kukreja, India

The server's host key not found in the cache. sporadic issue

Hi All,

The automated script is working in 6 out of 10 runs. Below are the messages that are received in success and failure scenarios.

================================================================
Success Message:
Executed as user: AccountName\UserID C:\Windows\system32>echo offbatch abort confirm off Searching for host...Connecting to host...Authenticating...Using username "UserID". Authenticating with pre-entered password.Authenticated. Starting the session...Reading remote directory...Session started. Active session: Other details
================================================================

Now the failure message:

Message
Executed as user: AccountName\UserID. C:\Windows\system32>echo offbatch abort confirm off Searching for host... Connecting to host...Authenticating... The server's host key was not found in the cache. You have no guarantee that the server is the computer you think it is. The server's rsa2 key fingerprint is: ssh-rsa XXXX xx:xx:xx:xx:xx:xx:xx:xx:xx:xx If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel. Continue connecting and add host key to the cache? (Y)es, (N)o, C(a)ncel, (C)opy Key: Cancel Host key wasn't verified! Host key fingerprint is ssh-rsa XXXX xx:xx:xx:xx:xx:xx:xx:xx:xx:xx Authentication failed.

Any help on this please?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: The server's host key not found in the cache. sporadic issue

I assume the address you connect to load balances to two separate servers, each with a different host key.
You can specify multiple semicolon-separated hostkeys, like open -hostkey="key1;key2".
See https://winscp.net/eng/docs/scriptcommand_open
_________________
Martin Prikryl

Reply with quote

Lalit Kukreja
Joined:
Posts:
2
Location:
Lalit Kukreja, India

Automated script works 6 out of 10 runs but fails otherwise

Apologies for not being able to respond earlier than now.

Thank-you for your response.. I am still working with the other systems who own the server in question to get a confirmation regarding the point that you have highlighted above...

I should confirm it to you once I hear back from them.

Thanks again!! :)

Reply with quote

kyokum
Guest

Two host keys

Would that be coded
-hostkey="ssh-rsa 2048 key1;key2"
or
-hostkey="ssh-rsa 2048 key1;ssh-rsa 2048 key2"
??

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: Two host keys

kyokum wrote:

-hostkey="ssh-rsa 2048 key1;ssh-rsa 2048 key2"
This is correct.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum