Automating SSH into a remote server.

ssh-keygen

Install a "key" to automate remote server access via ssh.

To allow computer B to access computer A via ssh without being prompted for a password, generate an ssh key on computer B and install the key on computer A.

Why? If you want to set up a cron job to backup A to B from B using rsync, it is easy to use ssh with a key. The ssh key should be generated for root so that all users of server A have their files backed up automatically, without need for each user to set-up a backup scheme. You need to be able to sign in to both A and B as root to generate and install a key. On DietPi you must replace DropBear with OpenSSH on both computer A and B.

On computer B as root to generate a key.
ssh-keygen

Install the generated key from computer B to computer A
ssh-copy-id root@computerA

Test that the key works from B
ssh root@computerA
If the key works you will not be prompted for a password.

You can now set-up a cron job to automatically backup A to B.