Sponsored Content
Full Discussion: GnuPG Syntax Help
Top Forums Shell Programming and Scripting GnuPG Syntax Help Post 302801119 by Korn0474 on Wednesday 1st of May 2013 11:04:26 AM
Old 05-01-2013
GnuPG Syntax Help

Hi all,

I'm trying to decrypt a GnuPG file but not having much luck. I'm new to using it and have tried 4 different ways to do it but nothing works. Here are examples of the attempts I have made:
Code:
gpg -o ./file_name.tar.Z --passphrase-fd 0 ./file_name.tar.Z.gpg 0<./password.txt

Code:
cat ./password.txt | gpg --passphrase-fd 0 --output ./file_name.tar.Z --decrypt ./file_name.tar.Z.gpg

Code:
cat ./password.txt|gpg --output ./file_name.tar.Z --batch --passphrase-fd 0 --decrypt ./file_name.tar.Z.gpg

Code:
echo [passphrase text]|gpg --output ./file_name.tar.Z --batch --passphrase-fd 0 --decrypt ./file_name.tar.Z.gpg

In every case this is the error message I recieve back:
Code:
gpg: encrypted with ELG-E key, ID
gpg: decryption failed: secret key not available

which I don't understand because the secret key has been given, either by the password.txt or via the echo statement, and I've been assured that the passphrase is correct so unless I'm being lied to I must be doing something wrong yes?

Thanks in advance for any help provided.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

GnuPG (gpg command)

I've been blessed with the task of writing functions that will be used to encrypt / decrypt data files using the Gnupg (gpg command) software on our Solaris 9. This was just installed last friday and I've got no documentation other than what I've found on the web. I was successful in writing... (4 Replies)
Discussion started by: BCarlson
4 Replies

2. Shell Programming and Scripting

Problem with GnuPG...need help

hello, i am writing an automated script for GnuPG decryption for a file, which was already being encrypted, homedir="/home/.gnupg" PassPhrase=`cat /home/.gnupg/.passphrase` echo $PassPhrase | gpg --homedir $homedir --passphrase-fd 0 --no-tty --output secret21.txt --decrypt-files... (0 Replies)
Discussion started by: manas_ranjan
0 Replies

3. UNIX for Dummies Questions & Answers

Gnupg

hey guys i need to restrict access to the GNUPG program because of the possibility that sensitive data like encryption keys and passwords that it is using may be written into the virtual memory swap partition on the hard disk and thus be retrieved at a later date long after the program has... (2 Replies)
Discussion started by: mile1982
2 Replies

4. Ubuntu

How to use GnuPG with MUTT, getting error!

I am using MUTT and I have configured my gmail account in it. I want to use GnuPG(gpg) in it. But even after importing I get key not found error while sending. Please help me for this problem. ---------- Post updated at 11:26 PM ---------- Previous update was at 07:48 AM ---------- This is... (0 Replies)
Discussion started by: nixhead
0 Replies

5. Shell Programming and Scripting

for ... do - syntax

hi! pls help me :) cd folder for f in *; do ... done this circle takes all files from folder1 i need only .pdf files but it may be like a.pdf or a.PDF what syntax must i use? smth like it: cd folder for f in *.(pdf|PDF); do (2 Replies)
Discussion started by: optik77
2 Replies

6. Cybersecurity

[PGP/GnuPG] Importing and signing keys

Hi, I need to export an existing PGP key and import it into GnuPG on a different machine. This is how I did the export: pgp -kx myuser _myuser_public pgp -kx myuser _myuser_private secring.skr (this is from the pgp installation directory that contains secring.skr). This produced two... (0 Replies)
Discussion started by: imchi
0 Replies

7. UNIX for Dummies Questions & Answers

Import and export PGP/GnuPG keys

Hi, I need to export an existing PGP key and import it into GnuPG on a different machine. This is how I did the export: pgp -kx myuser _myuser_public pgp -kx myuser _myuser_private secring.skr (this is from the pgp installation directory that contains secring.skr). This produced two... (0 Replies)
Discussion started by: imchi
0 Replies

8. Solaris

Gnupg library issues on Solaris 11

I have installed gnupg from the official Solaris 11 repository, but am experiencing library issues. This is the error I am getting: ld.so.1: gpg2: fatal: relocation error: file /usr/lib/libreadline.so.5: symbol tgetent: referenced symbol not foundSee more information here: bash-4.1$ gpg2... (4 Replies)
Discussion started by: ujjain
4 Replies

9. Shell Programming and Scripting

Gpg (GnuPG) encryption and decryption

Hi Friends, There are some 7 years script in out linux server. I am trying to understand them since Linux Server changed(A). Below line in one of the encrypting script. Here scenario is encrypting bank files in our (A) server and doing Secure Copy to Server (B). GPG -v --batch --yes --armor... (1 Reply)
Discussion started by: johnsnow
1 Replies
AMCRYPT(8)						  System Administration Commands						AMCRYPT(8)

NAME
amcrypt - reference crypt program for Amanda symmetric data encryption SYNOPSIS
amcrypt DESCRIPTION
amcrypt requires aespipe, uuencode and gpg to work. Aespipe is available from : http://loop-aes.sourceforge.net amcrypt will search for the aespipe program in the following directories: /usr/bin:/usr/local/bin:/sbin:/usr/sbin. amcrypt calls amaespipe and pass the passphrase through file descriptor 3. The passphrase should be stored in ~amanda/.am_passphrase. HOW TO CREATE ENCRYPTION KEYS FOR AMCRYPT
1. Create 65 random encryption keys and encrypt those keys using gpg. Reading from /dev/random may take indefinitely long if kernel's random entropy pool is empty. If that happens, do some other work on some other console (use keyboard, mouse and disks). head -c 2925 /dev/random | uuencode -m - | head -n 66 | tail -n 65 | gpg --symmetric -a > ~amanda/.gnupg/am_key.gpg This will ask for a passphrase. Remember this passphrase as you will need it in the next step. 2. Store the passphrase inside the home-directory of the AMANDA-user and protect it with proper permissions: echo my_secret_passphrase > ~amanda/.am_passphrase chown amanda:disk ~amanda/.am_passphrase chmod 700 ~amanda/.am_passphrase KEY AND PASSPHRASE
amcrypt uses the same key to encrypt and decrypt data. It is very important to store and protect the key and the passphrase properly. Encrypted backup data can only be recovered with the correct key and passphrase. SEE ALSO
amanda(8), amanda.conf(5), aespipe(1), amaespipe(8), gpg(1) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHOR
Kevin Till <kevin.till@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.3 01/10/2013 AMCRYPT(8)
All times are GMT -4. The time now is 01:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy