Passphrase on the command line

Stef Caunter stef at
Wed Mar 22 15:32:49 CET 2006

Here is my idiom; checking for success is vital.

See openssh documentation for details on key-based shell access. Test for 
transparent access, if using gpg, test for undisturbed encryption with --batch.

You can pipe the dump (or tar) to gpg instead of gzip. File size will be 
reduced. The dd command can also hit a tape, though this isn't always practical 
with nightly cron stuff.

OK=`/sbin/dump -0 -f - / | gzip | /usr/bin/ssh x.x.x.x dd of=/path/ok.gz 2>/dev/null;echo $?`
if [ $OK != 0 ]
echo "`date` `hostname` backup failed $OK" | mail you

echo "`date` `hostname` backup $OK" | mail -s "`hostname` backup $OK" you

Stef Caunter

>> Is there any documentation on how to do that?

More information about the Gnupg-users mailing list