Topic "script help to accept certificate automatically"

Author Message
Kent F

Guest


I'm very grateful for this program. We produce a radio program that we need to automatically upload to our server for radio stations to access. We've successfully done this using Windows Task Scheduler to run WinSCP with arguments (see code below). Our service provider recently switched over to FTPS - Explicit over TLS - which caused connection problems for some of the stations. That is an easy fix. The bigger issue has been when a script/schedule is used and a certificate needs to be accepted in order to connect... which seems to happen from time to time. The scheduled task never completes when a certificate needs to be accepted. We need to be able to have a reliable system... not wondering if the program ever made it to where it's supposed to go.

I've just read about using TlsHostCertificateFingerprint to avoid this certificate problem. I'm not a coder so I need a bit of help. I don't know what the proper syntax would be or where/how to incorporate it into our code below. Can someone point me in the right direction on this? Thanks!

/command "option batch abort" "option confirm off" "open ftp://radioprogram@sample.com@ftp.sample.com" "rm currentprogram.wav" "put C:\radioprogram\currentprogram.wav" "exit"

Also, is there a way to add a command to send us an email to tell us that the task succeeded or failed? That would be bonus.

Thanks!

Kent
Advertisements
Guest




If I could just see an example of this TlsHostCertificateFingerprint in the context of an argument for scheduler, I think that would be enough to get me going... or if it's not possible to do in the arguments for scheduler, to see what it would look like in a .bat file. If anyone can give me some direction, I would really be grateful.
Kent F wrote:
I'm very grateful for this program. We produce a radio program that we need to automatically upload to our server for radio stations to access. We've successfully done this using Windows Task Scheduler to run WinSCP with arguments (see code below). Our service provider recently switched over to FTPS - Explicit over TLS - which caused connection problems for some of the stations. That is an easy fix. The bigger issue has been when a script/schedule is used and a certificate needs to be accepted in order to connect... which seems to happen from time to time. The scheduled task never completes when a certificate needs to be accepted. We need to be able to have a reliable system... not wondering if the program ever made it to where it's supposed to go.

I've just read about using TlsHostCertificateFingerprint to avoid this certificate problem. I'm not a coder so I need a bit of help. I don't know what the proper syntax would be or where/how to incorporate it into our code below. Can someone point me in the right direction on this? Thanks!

/command "option batch abort" "option confirm off" "open ftp://radioprogram@sample.com@ftp.sample.com" "rm currentprogram.wav" "put C:\radioprogram\currentprogram.wav" "exit"

Also, is there a way to add a command to send us an email to tell us that the task succeeded or failed? That would be bonus.

Thanks!

Kent
Kent F

Guest


Still hoping someone will show me kindness here and give me some direction... I'm really stuck.

Thanks

Kent
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
/command ... "open -certificate=""xx:xx:xx:xx..."" ftp://radioprogram@sample.com@ftp.sample.com" ... "exit"

Though
Quote:
certificate needs to be accepted in order to connect... which seems to happen from time to time

It seems like the certificate is changing, so the above cannot help, as it is there to accept certain "known" certificate.
You can hack it by accepting any certificate using -certificate=*, but you loose ANY SECURITY by doing so.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License