Post a reply

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

niccoc1603

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

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.
niccoc1603

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"
martin

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:
https://winscp.net/tracker/1925
niccoc1603

Ok logs attached, thank you
martin

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

Hi, sorry I don't know where and how I should set
Session.SessionLogPath
martin

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.
niccoc1603

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
ftps://xxx:xxx%21;fingerprint=xx-58-e7-2a-xx-77-30-xx-2e-00-2e-xx-67-7a-xx-fa-16-xx-xx-xx@12x.11x.xxx.xxx/


and copy/pasted into the script file
$sessionUrl = "ftps://xxx:xxx%21;fingerprint=xx-58-e7-2a-xx-77-30-xx-2e-00-2e-xx-67-7a-xx-fa-16-xx-xx-xx@12x.11x.xxx.xxx/",


but I still get the same error
any help?

[EDIT]
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