Expect script to automate ftp upload
spawn ftp ftp.remotedomain.com
expect "Name (ftp.remotedomain:root):"
send "username\r" //provide the username here
send "password\r" //provide the password here
send "lcd /var/log/httpd\r" //any desired location
send "put *.acslog\r" //any file
Hope the script is self explanatory. You need to have "expect" rpm installed on the server and you can run it as
or you can put the above command in a file and can make it a bash executable.
With little modifications you can use this script for automating ssh logging also.
If anyone want help on that just post it here I will post taht code also