免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1224 | 回复: 2
打印 上一主题 下一主题

有会用gnupg的吗? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-12-22 11:29 |只看该作者 |倒序浏览
我想用shell做定期的文件加密,但是遇到问题
gpg -r mike@gpg.org -a --encrypt mike.txt
这句话执行之后,会问我一个问题,如何将这个问题屏蔽

我再gpg --help里面没有找到类似rm -f地用法,
而使用
gpg -r mike@gpg.org -a --encrypt mike.txt <<end
y
end
的方法也不行,不知道各位有什么办法吗?

论坛徽章:
0
2 [报告]
发表于 2003-12-22 16:51 |只看该作者

有会用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.

论坛徽章:
0
3 [报告]
发表于 2003-12-22 17:07 |只看该作者

有会用gnupg的吗?

ok i got the reason

shared to every one

http://www.gentoo.org/doc/tw/gnupg-user.xml
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP