![대칭적으로 인코딩된 gpg2 파일을 해독하는 방법은 무엇입니까?](https://linux55.com/image/130497/%EB%8C%80%EC%B9%AD%EC%A0%81%EC%9C%BC%EB%A1%9C%20%EC%9D%B8%EC%BD%94%EB%94%A9%EB%90%9C%20gpg2%20%ED%8C%8C%EC%9D%BC%EC%9D%84%20%ED%95%B4%EB%8F%85%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
다음 명령을 사용하여 암호화했습니다.
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.