script to delete multiple files in remote machine

Requirement
Several files in remote machines ought to be deleted via sh. Name of the files to be deleted are know

Approach
1) script was written with ftp (requires credential) and delete command. File names were passed as array(iterated via for loop-with ftp+delete commands enclosed within for loop). files were not getting deleted by this approach

2) another approach attempted was to pass temp.ftp(which contains delete command) to ftp command and rm the temp.ftp file eg.ftp <<temp.ftp..but this would be sucessful for open ftp which doenst require credentials

Request
require pointers to delete muliple files in remote machine via shell script

what have you tried so far ?
did you use the -n or -N option ? did you use a .netrc file ?
on which plateform are you ?

---------- Post updated at 12:30 AM ---------- Previous update was at 12:29 AM ----------

Does your FTP user has the sufficient authorizations to delete these file ?