You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
420 B
Plaintext
24 lines
420 B
Plaintext
9 years ago
|
#!/bin/sh
|
||
|
# sync gpg public keys between localhost and the specified hosts
|
||
|
#
|
||
|
# gpg-sync-keys host1 [host2 ...]
|
||
|
#
|
||
|
|
||
|
#GPG="gpg -q --batch"
|
||
|
GPG=gpg
|
||
|
|
||
|
hosts=$@
|
||
|
|
||
|
for host in $hosts; do
|
||
|
echo "Importing from $host ..."
|
||
|
ssh -C $host $GPG --export | $GPG --import
|
||
|
done
|
||
|
|
||
|
#echo "Refreshing keys ..."
|
||
|
#$GPG --refresh-keys
|
||
|
|
||
|
for host in $hosts; do
|
||
|
echo "Exporting to $host ..."
|
||
|
$GPG --export | ssh -C $host $GPG --import
|
||
|
done
|