- 论坛徽章:
- 0
|
有会用gnupg的吗?
可能说得不太清楚
我是这么做的:
user xxd:
gpg --gen-key
#key user name richard, mail richard_xu@abcd.com
gpg -a --export richard_xu@abcd.com > richard.asc
#then user roor
su
gpg --import richard.asc
#then generate a shell
vi encrypt.sh
#
# my shell
fIn=$1
mail="richard_xu@abcd.com"
fOut="outformat.asc"
# delete result
rm -f $fIn.asc
#encrypt file
gpg -r $mail -a --encrypt $fIn
more $fIn.asc >> $fOut.asc
rm -f $fIn.asc
# end of the shell
#now i use my shell:
sh encrypt.sh abcd.txt
#will show the following message
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?
I must input "y" here. is there anything wrong with my procedure?
I think the question may be occur at that i should valid the public key
at first, and how can i do it? If you have used gnupg before,can you give me some advice? thank you. |
|