Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Andrei-BY

Martin,

I have similar issue too - I can login to SFTP manually running winscp.exe however when running batch mode it says

"If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel."

Is there a way to clear the cache so I can accept the host key when opening SFTP site first time?

Thanks!
martin

Chage wrote:

It would be better if there was an ability to automatically accept the certificate regardless of fingerprint - when automating a file copy for a large number of servers, I do not particularly want to manually obtain the key fingerprint for 150+ servers.

Just for the first time, accept offered fingerprint and your are done.
Chage

It would be better if there was an ability to automatically accept the certificate regardless of fingerprint - when automating a file copy for a large number of servers, I do not particularly want to manually obtain the key fingerprint for 150+ servers.

Yes, it has security ramifications, but one would expect you know what you are doing if you are needing to do this..

Maybe a feature request for a -forceacceptkey switch or something could resolve this?
martin

Re: WinSCP Scripting, How to accept by default the server's host

It does not matter that the IP changes, as long as the key stays the same.
Guest

Re: WinSCP Scripting, How to accept by default the server's host

Hi,

I'm not sure that I could use the -hostkey="<fingerprint>" cmd!
Servers reboot and IP change...

Is there a scripting command that could be used and will force answer to be Y at question: "Continue connecting and add host key to the cache? (Y)es, (N)o, C(a)ncel.."

Thanks
Mart
martin

Re: WinSCP Scripting, How to accept by default the server's host

Use -hostkey switch.
Mart'

WinSCP Scripting, How to accept by default the server's host

Hi,
I need to use WinSCP to copy file on different Linux platform.
Their IP change, so WinSCP does not keep a host key in cache...

In scripting mode, Is there a command, that could be add in the scripting file, to automaticaly accept the host key?

I call the winscp.exe /script=scripting.txt from an application in Visual C++.

Regards,
Mart'