1.对称加密6和7的操作

加密:gpg -c filename

解密查看不生成文件:gpg -d file.gpg

解密生成文件:gpg -o filename -d file.gpg

CentOS-6

提示错误,在图形化界面操作就可以了

can't connect to /root/.gnupg/S.gpg-agent': No such file or directory xprop: unable to open display 'localhost:11.0' (pinentry-gtk-2:25207): Gtk-WARNING **: cannot open display: localhost:11.0 gpg-agent[25206]: can't connect server: ec=4.16383 gpg-agent[25206]: can't connect to the PIN entry module: End of file gpg-agent[25206]: command get_passphrase failed: No pinentry gpg: problem with the agent: No pinentry gpg: error creating passphrase: Operation cancelled gpg: symmetric encryption of fstab' failed: Operation cancelled











原文地址:https://www.cnblogs.com/lqynkdcwy/p/9626222.html