The server's host key was not found in the cache

Advertisement

Guest

The server's host key was not found in the cache

Hi Experts,

I am trying to execute a batch through the task scheduler and fails with the below error. But when i try to run the batch manually it works fine. Please help, its quiet urgent.

Below is my code:-
===================

"C:\Program Files (x86)\WinSCP\winscp.com" /command "open sftp://XXXXX:XXXXXX@XXXXXX.XXXXXX.com" "ls" "cd WORK" "get TEST*.txt E:\TESTFOLDER\" "exit"

Below is the log:-
==================

Continue connecting to an unknown server and add its host key to a cache?
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.
If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
(Y)es, (N)o, C(a)ncel, (C)opy Key: Cancel
Host key wasn't verified!
Host key fingerprint is ssh-rsa 2048 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX

Authentication failed.

Thanks,
Uday

Reply with quote

Advertisement

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,316
Location:
Prague, Czechia

Thanks, but the above post did not help me.
You have to be more specific. What is the problem? You do not understand it? Or you did try to follow the instructions (which specifically?) and it did not help?
_________________
Martin Prikryl

Reply with quote

Guest

Tried this way, but still it's nor working. Suggestions please

"C:\Program Files (x86)\WinSCP\winscp.com" /command "open sftp://XXXXX:XXXXXX@XXXXXX.XXXXXX.com" /hostkey="ssh-rsa 2048 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX" "ls" "cd WORK" "get TEST*.txt E:\TESTFOLDER\" "exit"

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,316
Location:
Prague, Czechia

It should be:
... /command "open sftp://XXXXX:XXXXXX@XXXXXX.XXXXXX.com -hostkey=""ssh-rsa 2048 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX""" "ls" ...

And make sure you use actual fingerprint, not the XX:XX:XX...

Reply with quote

Guest

Tried this way but still same error :( Please help.

c:\TEST>"C:\Program Files (x86)\WinSCP\winscp.com" /command "open sftp://XXXXXXXXXX:XXXXXX@XXXXXXXXXXXXXXX -hostkey=""ssh-rsa 2048 ssh-rsa 2048 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX""" "ls" "cd TEST" "get -TEST*.txt C:\TEST\" "exit"
Searching for host...
Connecting to host...
Authenticating...
Continue connecting to an unknown server and add its host key to a cache?
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 2048 XX:XX:XX:XX:XX:XX: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.
(Y)es, (N)o, C(a)ncel, (C)opy Key: Cancel
Host key wasn't verified!
Host key fingerprint is ssh-rsa 2048 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX.

Authentication failed.
:( :(

Reply with quote

Advertisement

Guest

martin wrote:

It should be:
... /command "open sftp://XXXXX:XXXXXX@XXXXXX.XXXXXX.com -hostkey=""ssh-rsa 2048 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX""" "ls" ...

And make sure you use actual fingerprint, not the XX:XX:XX...

Thanks a lot, it worked! :D

Reply with quote

53Alpha
Guest

permissions getting file tranferred denied

Thanks for the information. Now the files being transferred are getting permission denied. Where I can manually move the files without a problem.

Reply with quote

Advertisement

You can post new topics in this forum