GNU screen and ssh-agent
I changed my rsync backup script to use root (well, sudo) to sync my desktop machine with my fileserver after the recent problems I found with BackInTime not being able to read my entire $HOME directory.
That gave rise to the problem that if I ssh from the desktop into the fileserver, run screen, run ssh-add, run the rsync script and then detach the screen, the $SSH_AUTH_SOCK variable gets nuked, so after the first call to rsync-over-ssh, the script prompts for the ssh key’s passphrase again.