다음 명령을 사용하여 암호화했습니다.
gpg2 -c --passphrase thePassword --batch --no-tty <file >file.gpg2
비밀번호를 알고 나면 어떻게 해독하나요?
답변1
방금 테스트했는데 작동합니다.
첫 번째 가상 머신에서:
[yurij@centos7 gpg]$ cat test2.c
Another test.
Really?
OK.
[yurij@centos7 gpg]$ gpg2 -c --passphrase password --batch --no-tty < test2.c >test2.c.gpg2
[yurij@centos7 gpg]$ cat test2.c.gpg2
�c�a����0Li�p��t���JL��(
�ޢ� Xt��Z�f��(s�XU�K(ؖ��n�O[yurij@centos7 gpg]$
[yurij@centos7 gpg]$ scp test2.c.gpg2 192.168.56.4:trash/gpg
[email protected]'s password:
test2.c.gpg2 100% 65 57.6KB/s 00:00
두 번째 가상 머신에서:
yurij@debian9:~/trash/gpg$ cat test2.c.gpg2
�c�a����0Li�p��t���JL��(
�ޢ� Xt��Z�f��(s�XU�K(ؖ��n�Oyurij@debian9:~/trash/gpg$
yurij@debian9:~/trash/gpg$ gpg -d --passphrase password --batch --no-tty < test2.c.gpg2 >test2.c.decrypted
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: WARNING: message was not integrity protected
yurij@debian9:~/trash/gpg$ cat test2.c.decrypted
Another test.
Really?
OK.