I have a shell script which is performing some renaming and archiving steps. I have added sftp commands to copy multiple files. But when i try to login to the remote machine thru putty it asks for confirmation like Are you sure you want to continue connecting (yes/no)? . I need to enter yes. but since this is being done thru the script am not sure how to do it. below is the script i am using
cd <File Source Location>
sftp user1@remoteserver
sftp> cd <target location to be copied>
sftp> mput *.gz
quit
how to i pass yes in the above code after sftp user1@remoteserver
is executed.
Any help is much appreciated.