On Thu, 7 Nov 2002 15:28, Gurdeep Singh wrote: > Hello, > > Can anyone guide me on automating SCP. > > I wish to transfer files through SCP twice daily, as an automated cron > job. > Can anyone help me with a script which will do this. > I wish to use SCP with password only. > > Regards, > > Gurdeep > > You just need to do it the same as you would copy. Except that files located on remote hosts are specified in the form user@host:<file> So if you want to copy the files "1.txt" and "2.txt" to the directory "/home/paul/files" on the remote host "somehost" and authenticate as "paul", you would type (note the $ is your bash prompt): $scp 1.txt 2.txt paul@somehost:/home/paul/files Simple enough. now just put that into a script and add a cron job that runs the script twice a day. Now, that's al good and well, but once you've come across rsync there's no turning back. Check out the man page, it's very clear and easy to follow. rsync can save on bandwidth by only copying the parts of each file thats different. It's very configurable and is a great alternative to scp. Cheers, Paul. ------------------------------------------------------------------------ To unsubscribe email security-discuss-request@linuxsecurity.com with "unsubscribe" in the subject of the message.