http://stackoverflow.com – I've stumbled upon an issue when I tried to automate backups via duplicity: duplicity can't scp while running in my bash script, as strange as that sounds. I tried specifying path to the private key file in at least 15 ways, I tried messing with ssh-agent and ssh-add from within the script, no dice. Running as root, this is my script: #!/bin/bash export PASSPHRASE='password' duplicity --exclude /sys --exclude /mnt --exclude /tmp --exclude /proc / scp://user@example.org/$HOSTNAME duplicity remove-older-than 6M --force scp://user@example.org/$HOSTNAME unset PASSPHRASE These commands work fla (HowTos)