ssh and scp
Using scp to a remote computer is a really good idea too and my backup program does that every night as well. Here is how to set up unattended ssh/scp. In this case, the root account on machine 1 (M1) will be able to scp files to the guest1 account on machine 2 (M2). I do it this way because I always disable root access of ssh/scp for security reasons on all my machines.
First make sure
sshhas been run at least once on each machine. This will set up some needed directories and files.On M1, under
root, run thessh-keygen -t rsacommand. This will create the fileid_rsa.pubin the/root/.sshdirectory.Use
scpto copy that file to M2 to the/tmpdirectory (or some other suitable location).On M2 go to the /
home/guest1/.ssh directory.If there is already an
authorized_keysfile edit it, otherwise create it.Copy the line in the
/tmp/id_rsa.pubfile into theauthorized_keysfile and save it.
Test this by using scp to copy a file from M1 to M2. It should work without prompting for a password...