Note:- “StrictHostKeyChecking=no” option in sftp command is to accept keys from SFTP server automatically , otherwise if you are accessing the server first time, it may wait and ask for accepting the keys , eventually your script won’t continue from there.