I am running Ubuntu 9.10 desktop on my home machine. I need to upload files from my local machine, to my web server, on a periodic basis. My server is running Ubuntu Server LTS.
I want my server to be secure, and only run the LAMP stack and possibly, an email server. I do not (ideally) want to have FTP or anything that can allow (more) knowledgeable hackers to be able to hack into my server.
Can anyone recommend how I may send files from my local machine to the server?
This may seem an easy/trivial question, but I am relatively new to Linux - and I got my previous Windows server machine serious hacked in the past, hence the move to Linux, and thats why I am so security conscious.
There seems to be quite a lot of ways of doing this (judging from the answers I have received so far) - yet there seems to be no clear winner. therefore, I am adding some more information, in the hope that a clear winner (in terms of best practices) will emerge.
- I would like to automate this - i.e. run from a shell script as a cron job.
- I am concerned about security, and so, I dont want to have passwords in plain text in the scripts or to send passwords unencrypted etc
Both the client and (remote) server are Debian based, so hopefully, file permissions will be preserved in the copy.
i. If this is not possible, who will be the default owner of the copied files? The uploaded files will be read by another script (on the server). What should the relationship (in terms of file permissions) be, between the uploading script and the processing script?