Post a reply

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)


Topic review


Well it did run, but it reported the error above in my first post

I understand that.
What I do not understand is, how you got the log file, where you claim to use the URL with the fingerprint and not the $sessionOptions.TlsHostCertificateFingerprint. Because with the URL with the fingerprint, the script should break at the very beginning, without creating any log file.

HI, what I did was adding the following string to the script, and it works

$sessionOptions.TlsHostCertificateFingerprint = "xx-58-e7-2a-xx-77-30-xx-2e-00-2e-xx-67-7a-xx-fa-16-xx-xx-xx"

Actually, I've realized that 5.17.8 indeed does not support the "fingerprint" in the FTPS URL. It's fixed in upcoming 5.18. But with 5.17.8, you should get
Exception calling "ParseUrl" with "1" argument(s): "SSH host key fingerprint "xx-xx-xx-..." does not match pattern /..../"

Did you tamper with the script somehow to avoid this error?

I'm adding the (already fixed) issue to the tracker, now that you have faced it:

Ok logs attached, thank you

Just before the Session.Open:
$session.SessionLogPath = "C:\path\winscp.log"

Hi, sorry I don't know where and how I should set

Re: KeepLocalUpToDate not working

Can you please attach logs from both scenarios? (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

KeepLocalUpToDate not working

Hi, i am an absolute newbie.

I am trying to use this script but I get this error:

Exception calling "Open" with "1" argument(s): "Connection failed.
Peer certificate rejected
Disconnected from server
Connection failed."

I generated the sessionUrl which looks like this

and copy/pasted into the script file
$sessionUrl = "ftps://xxx:xxx%21;",

but I still get the same error
any help?

searching the forum I added the following string
$sessionOptions.TlsHostCertificateFingerprint = "xx-58-e7-2a-xx-77-30-xx-2e-00-2e-xx-67-7a-xx-fa-16-xx-xx-xx"

and it works now