TobiSGD |
09-23-2013 02:32 PM |
Of course. To have this working easily you must run a SSH server on the target machine. To automate the whole thing you should enable and configure key-based authentication on the target machine. If you do the copy action manually and are comfortable with typing a password this isn't necessary.
I always use rsync for such actions, the syntax comes down to
Code:
rsync /path/to/source/on/local/machine remote_user@remote_machine:/path/to/target/folder/on/remote/machine
For example, if I want to copy the file /home/tobi/test.txt to the folder /data/backups on a remote machine called server (known with IP in my hosts file) using the user backup_user this would look like
Code:
rsync /home/tobi/test.txt backup_user@server:/data/backups
The rsync manpage is very extensive and has quite a lot examples, so it will definitely help to look at that.
|