When building a Linux machine, sometimes it becomes necessary to set up cron jobs to transfer files or logs from one machine to another on a regular basis. If this is the case, I recommend setting up password-less SSH from one machine to the other. I decided to post about this here because it always took me a while to find the right commands or tutorial online to get it to work. Finally I found a great post from the Debian Administration team. Here is quick summary/tutorial.
To make passwordless connections, you first need to generate the appropriate SSH keys on the connecting computer.
-
-
-
<p>Make sure to not set a passphrase - that defeats the purpose. Then transfer your public key to your target computer (in this case the user <em>username </em>from the computer named <em>target</em>)</p>
-
-
<pre lang="bash">$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@target
There we go, password-less SSH should be working one-way. If you wish to set it up the other direction, just run the same commands from the other machine (replacing the username@target).
For a more detailed tutorial, check out the Debian post about it.

