Please advise,
The previous thread asked about the automated transfer of files between two servers. The question is - is there any way of encrypting the password within the script or is it a matter of setting the permissions settings on the script so that it can only be executed and possibly not read. Does the etc/hosts file come into play when setting up such connections?
Previous solution - note the username and password are visable
You may modify few of lines before running.
#!/bin/ksh
#Modify these three lines
USER=your_login_name
PASS=your_password
HOST=THE_DESTINATION_IP
FTPLOG=LOG_FOR_YOUR_REFERENCE
ftp -ivn << EOF > $FTPLOG 2>&1
open $HOST
user $USER $PASS
#If the file is binary, change it from 'asc' to 'bi'
asc
#Modify this line
cd /DESTINATION_PATH
put fbdemo.dat
bye
EOF
Then you can put this script in crontab for auto run. I will give you another post for interactive because you may think that it has a security issue on password shown in a script.