The issue is certificate authentication
Right now I am using WinSCP GUI and in the Advanced settings of the WinSCP session with remote server I have supplied the SSL certificate.
WinSCP connects to remote server using this certificate and once sessions is established I go to a remote directory and copy a file to local directory.
I need to automate this and schedule it so that in every 30 minutes the script is run and if a new file is copied to remote server directory, it will be copied to the local directory.
I have one script which works fine for FTP but for SFTP with certificate I need help in creating a script which can be used to connect to remote SFTP server passing on certificate authentication and download the file.