I have an Ubuntu 9.10 desktop machine which I use locally. I am setting up a server on a hosting provider. The server will run a very minimal version of Ubuntu server LTS (only LAMP and email server no GUI).
I want to write a script (scheduled as a cron job) that will allow me to upload local files onto the server. I want to use [SFTP][1], for security reasons.
I am new to shell scripting - but I guess shell scripting is the way to do this (unless I am mistaken).
Can anyone provide me with the initial pointers on how to go about writing such a script, in order to SECURELY upload local files to the server?
Ideally, I would like to compress the files before the transfer (to save on bandwidth)
[1]: http://SSH file transfer protocol