How to copy files from local machine to server using SSH file transfer protocol?

Posted by morpheous on Stack Overflow See other posts from Stack Overflow or by morpheous
Published on 2010-05-11T12:49:35Z Indexed on 2010/05/11 12:54 UTC
Read the original article Hit count: 184

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about sftp

Related posts about ubuntu