I have multiple DS218j nas devices behind a firewall. I have a script that currently runs on all the nas devices to ftp .tif images to a server located behind same firewall. I do not have access to the server other than sending images. They are going to update to using sftp to receive these images. I am in need of help on a script to send these images via sftp using a password and user name. Any help would be greatly appreciated. My current script is:
#!/bin/ash
chmod +x FTP.sh
PATH=/opt/bin:/opt/sbin:$PATH
SOURCE=/volume1/documents/tiffs
BACKUPDIR=/documents/
lftp -u user,password 10.0.0.5 << EOF
mirror -R -n -I *.tif -I *.tif -X Collage/ -X ‘whatever/’ -X .piccache/ -X .recent/ -X Originals/ -X *.Db -X ‘@eaDir/’ $SOURCE $BACKUPDIR/
quit
#!/bin/ash
chmod +x FTP.sh
PATH=/opt/bin:/opt/sbin:$PATH
SOURCE=/volume1/documents/tiffs
BACKUPDIR=/documents/
lftp -u user,password 10.0.0.5 << EOF
mirror -R -n -I *.tif -I *.tif -X Collage/ -X ‘whatever/’ -X .piccache/ -X .recent/ -X Originals/ -X *.Db -X ‘@eaDir/’ $SOURCE $BACKUPDIR/
quit