首页 > 代码库 > GnuPG高级指导(2)上传/导出分发公钥
GnuPG高级指导(2)上传/导出分发公钥
1 上传到keyserver
opensuse13:~ # gpg -k
/root/.gnupg/pubring.gpg
------------------------
pub 4096R/276856F7 2016-11-25 [expires: 2017-04-24]
uid [ultimate] FranklinYang (Encrypt RSA 4096) <andypeker@163.com>
sub 4096R/0A09DAC9 2016-11-25 [expires: 2017-04-24]
opensuse13:~ #
opensuse13:~ #
opensuse13:~ #
opensuse13:~ # gpg --keyserver hkp://keys.gnupg.net --send-keys 276856F7
gpg: sending key 276856F7 to hkp server keys.gnupg.net
opensuse13:~ #
root@debian8:~# gpg --keyserver hkp://keys.gnupg.net --recv-keys 276856F7
gpg: requesting key 276856F7 from hkp server keys.gnupg.net
gpg: key 276856F7: public key "FranklinYang (Encrypt RSA 4096) <andypeker@163.com>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
root@debian8:~# gpg -k
/root/.gnupg/pubring.gpg
------------------------
pub 4096R/276856F7 2016-11-25 [expires: 2017-04-24]
uid FranklinYang (Encrypt RSA 4096) <andypeker@163.com>
sub 4096R/0A09DAC9 2016-11-25 [expires: 2017-04-24]
root@debian8:~#
2 导出后通过其他方式分发(百度云、www、mail等随意)
opensuse13:~ # gpg -k
/root/.gnupg/pubring.gpg
------------------------
pub 4096R/276856F7 2016-11-25 [expires: 2017-04-24]
uid [ultimate] FranklinYang (Encrypt RSA 4096) <andypeker@163.com>
sub 4096R/0A09DAC9 2016-11-25 [expires: 2017-04-24]
opensuse13:~ # gpg -a -o FranklinYang.rsa.pub.key --export 276856F7
opensuse13:~ #
opensuse13:~ # l FranklinYang.rsa.pub.key
-rw-r--r-- 1 root root 3132 Nov 25 21:21 FranklinYang.rsa.pub.key
opensuse13:~ #
GnuPG高级指导(2)上传/导出分发公钥