port_blair2001
asked on
UNIX Shell Script to Transfer Files via FTP
When i execute the script I get up to here as shown below
Connected to xxxx.com.
220 xxx FTP server (Version 1.1.214.4(PHNE_34544) Fri Feb 24 15:0
3:24 GMT 2006) ready.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Its not automatically logging in and puttin the files to the remote server
Connected to xxxx.com.
220 xxx FTP server (Version 1.1.214.4(PHNE_34544) Fri Feb 24 15:0
3:24 GMT 2006) ready.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Its not automatically logging in and puttin the files to the remote server
LOCALDIR=/backup
REMOTESERVER=servername
REMOTEPATH=/backup
LOGIN=xxxx
PASSWORD=xxxx
cd $LOCALDIR
ftp -n $REMOTESERVER << INPUT_END
quote user $LOGIN
quote pass $PASSWORD
cd $REMOTEPATH
prompt off
mput * devid.*
exit
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
One more comment, it is not a good practice to put passwords in scripts. Please avoid whenever possible.
If you want a more secure way to transfer files, then consider using sftp / scp (you need ssh installed on the other server and sftp / scp on your side).
One more comment, it is not a good practice to put passwords in scripts. Please avoid whenever possible.
If you want a more secure way to transfer files, then consider using sftp / scp (you need ssh installed on the other server and sftp / scp on your side).
I'd suggest ncftp client which contains ncftpget/ncftpput which act in similar manner to rcp/scp, password stored no questions or interaction asked.
Hello port_blair2001,
you can try this
https://www.experts-exchange.com/questions/21903096/help-required-to-ftp-my-unix-files-to-windows-machine.html
from
Karunamoorthy.
you can try this
https://www.experts-exchange.com/questions/21903096/help-required-to-ftp-my-unix-files-to-windows-machine.html
from
Karunamoorthy.
use PureFTP, this doesn't require any script
SA
SA
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Doing it your way is rather error prone