Problem accepting certificate automatically
I am exeucuting a script which executes the following command:
> C:\"program files"\winscp\winscp.exe /ini="D:/Conf.ini" /console /log="D:\Log.log" /command "open ftps://user:pass@SERVER.COM -passive -certificate=""xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""""" "option transfer binary""" "option confirm off""" "cd """ "put D:\*.*""" "exit"""
And my log shows the following prompt which I can't answer since I am executing it from a script:
> Continue connecting and store the certificate? ()
I have accepted manually, but when running the script it keeps showing the question.
Do any of you know how could I accept this from the command? I have added the -certificate (with the fingerprint shown in the log) to my command and still can't make it work
This is what my log shows
> Connecting to XXX.XXX.XXX.XXX:XXX ...
> Connected with XXX.XXX.XXX.XXX:XXX, negotiating SSL connection...
> Asking user:
> The server's certificate is not known. You have no guarantee that the server is the computer you think it is. Server's certificate details follow:
>
> Issuer:
> - Organization: XXXXXXXXXX
> - Location: XXXXXXXXXX
>
> Subject:
> - Organization: XXXXXXXXXX
> - Location: XXXXXXXXX
>
> Valid: 7/26/2011 12:00:00 AM - 7/27/2012 11:59:59 PM
>
> Fingerprint (SHA1): xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
>
> Summary: Self signed certificate in certificate chain. The error occured at a depth of 3 in the certificate chain.
>
> If you trust this certificate, press Yes. To connect without storing certificate, press No. To abandon the connection press Cancel.
>
> Continue connecting and store the certificate? ()
> C:\"program files"\winscp\winscp.exe /ini="D:/Conf.ini" /console /log="D:\Log.log" /command "open ftps://user:pass@SERVER.COM -passive -certificate=""xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""""" "option transfer binary""" "option confirm off""" "cd """ "put D:\*.*""" "exit"""
And my log shows the following prompt which I can't answer since I am executing it from a script:
> Continue connecting and store the certificate? ()
I have accepted manually, but when running the script it keeps showing the question.
Do any of you know how could I accept this from the command? I have added the -certificate (with the fingerprint shown in the log) to my command and still can't make it work
This is what my log shows
> Connecting to XXX.XXX.XXX.XXX:XXX ...
> Connected with XXX.XXX.XXX.XXX:XXX, negotiating SSL connection...
> Asking user:
> The server's certificate is not known. You have no guarantee that the server is the computer you think it is. Server's certificate details follow:
>
> Issuer:
> - Organization: XXXXXXXXXX
> - Location: XXXXXXXXXX
>
> Subject:
> - Organization: XXXXXXXXXX
> - Location: XXXXXXXXX
>
> Valid: 7/26/2011 12:00:00 AM - 7/27/2012 11:59:59 PM
>
> Fingerprint (SHA1): xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
>
> Summary: Self signed certificate in certificate chain. The error occured at a depth of 3 in the certificate chain.
>
> If you trust this certificate, press Yes. To connect without storing certificate, press No. To abandon the connection press Cancel.
>
> Continue connecting and store the certificate? ()