Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-07-2012, 02:31 PM   #1
Ashish Sood
Registered: Feb 2009
Location: Gwalior
Distribution: Fedora 22, RHEL 6,7
Posts: 167

Rep: Reputation: 15
GPG : Failed to decrypt the file

Hi All,

I dont know what i am doing wrong, but i am facing a problem while decrypt gpg encrypted file , Below is the step of what is was doing.


# gpg --gen-key => Generate GPG key

# gpg --export --armor keyname > output.key => take gpg key to output.key

#gpg --encrypt --armor --recipient recptname filename =>encrypt file for recipient

# scp output.key => 10.2 is my client system where i copy my output gpg key

scp filename.asc => copy the excrypted file to my client system


# cd /root/key

# gpg --import output.key => import server gpg key to my client system

# gpg filename.key => Try to decrypt but fail and getting the below error message

gpg: encrypted with 1024-bit ELG-E key, ID 05ABA7C9, created 2012-05-07
"Ashish <>"
gpg: decryption failed: secret key not available

It telling me that secret key is not available but its is available on my system, below is the output from my client system

# gpg --list-key

pub 1024D/34E9A260 2012-05-07
uid Ashish <>
sub 1024g/05ABA7C9 2012-05-07

Guys please tell me what is wrong in this . hope to get your reply ASAP

Ashish Sood
Old 05-07-2012, 03:02 PM   #2
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,994
Blog Entries: 4

Rep: Reputation: 3141Reputation: 3141Reputation: 3141Reputation: 3141Reputation: 3141Reputation: 3141Reputation: 3141Reputation: 3141Reputation: 3141Reputation: 3141Reputation: 3141
Does the target system know about the key with signature 05ABA7C9? Has this key been imported from a suitable keyserver on that system? (Never mind yours!)

Print this (courtesy of a geek at NASA): ("Your Tax Dollars at Work." Really!)

Check the output of gpg --list-keys on the target system. If for whatever reason the desired key is not there, that system cannot decrypt the file.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can I decrypt GPG file that encrypted with my lost private key ? mesuutt Linux - General 4 12-17-2011 11:07 AM
decrypt pgp file using gpg and passphrase learn.dw29 Linux - Security 2 10-10-2011 01:50 PM
gpg decrypt problems bic Linux - Newbie 2 09-08-2009 10:03 PM
GPG: Bad session key gpg between gpg on linux and gpg gui on windows XP konqi Linux - Software 1 07-21-2009 09:37 AM
Can't decrypt anything with GPG Jorophose Linux - Security 2 12-06-2007 04:57 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration