The server was not your common one. It is possible that it has an unusual configuration. I will check. Thanks.
Re: Script for SFTP
I do not see any problem with any certificate in the log.
It seems that the server allows only key authentication.
While you seem to attempt a password authentication.
If you can connect in GUI, please compare the logs:
https://winscp.net/eng/docs/faq_script_vs_gui#logging If you do not spot the problem yourself, post the logs here.
Script for SFTP
We are trying to automate an SFTP call. When doing it manually, a site can be generated with just the host, user name and password. Then files can be up and downloaded. Trying to do the same thing with a script generates errors indicating a problem with the certificate. The manual site, and the script are attached.
The call to WinSCP was: