|
[alice@client ~]$ gpg --encrypt --armor --recipient bobby message.txt
gpg: WARNING: unsafe permissions on configuration file "/home/alice/.gnupg/gpg.conf"
gpg: WARNING: unsafe enclosing directory permissions on configuration file "/home/alice/.gnupg/gpg.conf"
gpg: 95B0A7D9: There is no indication that this key really belongs to the owner
1024g/95B0A7D9 2005-10-24 "bobby (bobby) <bob@server.example.org>"
Primary key fingerprint: A2F1 7484 EBF1 779B DF11 77DA 43CC B492 E46F 6791
Subkey fingerprint: 95D4 1042 C343 8050 FE38 685F 097C 27F4 95B0 A7D9
It is NOT certain that the key belongs to the person named
in the user ID. If you *really* know what you are doing,
you may answer the next question with yes
Use this key anyway?
gpg: message.txt: encryption failed: unusable public key
[alice@client ~]$
我参考KEVIN老师的GPG实验
创建alice bob
su - alice
mkdir .gnupg
gpg --gen-key
建立了KEY
BOB同
然后
BOB下
gpg --export --armor bobby > /tmp/bob.key
输出PUB KEY
ALICE下
gpg --import /tmp/bob.key
倒入BOB的PUB KEY
echo "11111">message.txt
gpg --encrypt --armor --recipient bobby message.txt
用BOB的PUBKEY加密asd.txt
问题就出在这里了。。。。
gpg: message.txt: encryption failed: unusable public key
意思是这个PUBKEY是没用的PUBKEY。。。晕倒。。
不过第一次做我是做出来的 不过后来想脱离书本做一下就失败了
然后再看书做。。也是这样 |
|