The issue is certificate authentication
Right now I am using Winscp GUI and in the advance settings of the Wincp session withe 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.