LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   gpg ecrypt / decrypt on Redhat 8 (https://www.linuxquestions.org/questions/linux-enterprise-47/gpg-ecrypt-decrypt-on-redhat-8-a-4175712254/)

lamoul 05-17-2022 01:57 PM

gpg ecrypt / decrypt on Redhat 8
 
Hi,

i am upgrading my redhat 6 to redhat 8. On redhat 6 i was using this code to decrypt the gpg file now with same code do not work on redhat 8.

Redhat 6: NO ISSUE
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)
gpg --version
gpg (GnuPG) 2.0.14

command to decrypt on redhat
/usr/bin/gpg2 --armor --batch --passphrase-file $HOME/.gnupg/passphrase.asc \
--status-file $HOME/FILES/new-test-file.log \
--output $HOME/NEW-KEY-FILES/test_key_001.txt \
--decrypt $HOME/NEW-KEY-FILES/test_key_001.txt.pgp

Redhat 8: ISSUE
Red Hat Enterprise Linux release 8.5 (Ootpa)
gpg --version
gpg (GnuPG) 2.2.20

command to decrypt

/usr/bin/gpg2 --armor --batch --pinentry-mode loopback --passphrase-file $HOME/.gnupg/passphrase.asc \
--status-file $HOME/FILES/new-test-file.log \
--output $HOME/NEW-KEY-FILES/test_key_001.txt \
--decrypt $HOME/NEW-KEY-FILES/test_key_001.txt.pgp

gpg: encrypted with 2048-bit RSA key, ID keyxxxx, created 2022-03-24
"key (Decrypt files) "
gpg: handle plaintext failed: General error

Anyone is having this issue please help.

Thank you very much!

TB0ne 05-18-2022 10:35 AM

Quote:

Originally Posted by lamoul (Post 6354233)
Hi,
i am upgrading my redhat 6 to redhat 8. On redhat 6 i was using this code to decrypt the gpg file now with same code do not work on redhat 8.

Redhat 6: NO ISSUE
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)
gpg --version
gpg (GnuPG) 2.0.14

command to decrypt on redhat
/usr/bin/gpg2 --armor --batch --passphrase-file $HOME/.gnupg/passphrase.asc --status-file $HOME/FILES/new-test-file.log --output $HOME/NEW-KEY-FILES/test_key_001.txt --decrypt $HOME/NEW-KEY-FILES/test_key_001.txt.pgp

Redhat 8: ISSUE
Red Hat Enterprise Linux release 8.5 (Ootpa)
gpg --version
gpg (GnuPG) 2.2.20

command to decrypt
/usr/bin/gpg2 --armor --batch --pinentry-mode loopback --passphrase-file $HOME/.gnupg/passphrase.asc --status-file $HOME/FILES/new-test-file.log --output $HOME/NEW-KEY-FILES/test_key_001.txt --decrypt $HOME/NEW-KEY-FILES/test_key_001.txt.pgp

gpg: encrypted with 2048-bit RSA key, ID keyxxxx, created 2022-03-24 "key (Decrypt files) "
gpg: handle plaintext failed: General error

Your two commands don't match, and you don't say what happens if you run the first command for RH6 on the RH8 server. Also, in doing a small bit of research, your error indicates some sort of file-name problem. The gpg program doesn't expand variables...have you tried putting in the entire filename, rather than just "$HOME/..."??

Also, have you contacted Red Hat support? You're using RHEL6 and RHEL8...you're PAYING for support, right??


All times are GMT -5. The time now is 03:07 AM.