GPG Encription problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting GPG Encription problem
# 8  
Old 07-13-2009
Hi pludi,
Thanks for spoon feeding. (I am sorry to make you do that, I am very new to Unix n Linux)
But I am getting an error saying

gpg: Invalid option "--passphrase-file"
# 9  
Old 07-13-2009
Which version of gpg are you using? (It's the first line of output from gpg --version) As far as I know GPG2 (>= 2.0.0) should support this.

If your version really doesn't know about that option, try using --passphrase-fd instead, eg
Code:
echo "s3cr3t" | gpg --passphrase-fd 0 ....

# 10  
Old 07-13-2009
OP is probably using the portable standalone version, i.e. 1.4.X
# 11  
Old 07-14-2009
Hey friends,
I am using gpg (GnuPG) 1.2.6

and tried solution echo "s3cr3t" | gpg --passphrase-fd 0 .... test.txt

but getting error
Reading passphrase from file descriptor 0
usage: gpg [options] [filename]

What to do :-(
# 12  
Old 07-14-2009
The dots aren't part of the actual command line. I put them there as placeholders because I was too lazy to type the whole command line again, and hoped it would be obvious that the --passphrase-file option was the only one to change.
# 13  
Old 07-14-2009
Dear Pludi,
By now you must have come to knw how dumb I am when it comes to Unix/Linux.. Sp can you please spoon fid once again?

Please write an exact syntax to encrypt test.txt file with password 12345
# 14  
Old 07-14-2009
This should do it:
Code:
echo "12345" | gpg --batch --no-tty --armor --passphrase-fd 0 --symmetric test.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

GPG encryption error ...

Hi. I'm hitting issues using gpg to encrypt a text file on Linux. gpg -c --passphrase 123 --cipher-algo AES256 test gpg: cancelled by user gpg: error creating passphrase: Operation cancelled gpg: symmetric encryption of `test' failed: Operation cancelled In this case the file test just... (3 Replies)
Discussion started by: user052009
3 Replies

2. Shell Programming and Scripting

GPG email attachment

Hi, Can we send gpg encrypted file as an email attachment using uuencode in linux??if so can you give me the code.. Regards, Sandeep. (1 Reply)
Discussion started by: sandeep karna
1 Replies

3. Shell Programming and Scripting

To pass the variable in gpg

Hi, While m using gpg manually it works fine. I want to include this command in my auto script. how to pass the passphrase and Use this key anyway? (y/N) in my script. Advance thanks. $ gpg --sign --output xx.gpg --encrypt --recipient GXS_CTE xx.ext You need a passphrase to unlock the secret... (3 Replies)
Discussion started by: chakkaravarthy
3 Replies

4. UNIX and Linux Applications

Using gpg

I am trying to use gig in linux but it is hanging. $ gpg --passphrase=test /tmp/test.sh Reading passphrase from file descriptor 0 ... When i press enter, it gives the below message: $ gpg --passphrase=test /tmp/test.sh Reading passphrase from file descriptor 0 ... gpg: no valid... (1 Reply)
Discussion started by: tcssk
1 Replies

5. Shell Programming and Scripting

Need help on File Encryption using gpg

Folks, Is there anyone to help on GPG file encryptions here. I got a public key from third party. I imported the key in server. I want to encrypt the public key. But without being signed , the key cannot be encrypted. When I try to sign the key using lsign command, I am getting the below... (1 Reply)
Discussion started by: dinesh1985
1 Replies

6. Shell Programming and Scripting

Cannot see GPG installation

Hello all I have installed gpg key be executing command gpg --gen-key and followed the on screen prompts. I have done all this stuff from my home directory Now i am unable to see the results. Where are these keys stored. Doesn't it create a new folder in my home directory and create the... (1 Reply)
Discussion started by: vasuarjula
1 Replies

7. Linux

GPG error on Debian 4 using apt-get

Hello, I wish to update a debian 4.0 server we have but cannot get past the following error message. my keys are as follows: Any help would be good. (0 Replies)
Discussion started by: pobman
0 Replies

8. UNIX for Dummies Questions & Answers

How to use GPG for myself on Thumb drive?

I have some sensitive data I would like to keep on a thumb drive. Now I know this is a UNIX/Linux forum and I regret to say that I'm using windows but I'm hoping that is irrelevant. So I install gpg on both windows machines: one at home and the other at work. I encrypt some stuff on the... (2 Replies)
Discussion started by: siegfried
2 Replies

9. UNIX for Dummies Questions & Answers

Gpg

Hi, I have imported the details given by my friend using gpg --import <file> Now i am using the encryption technique with my friend's key in the following way: gpg --output out.pgp --batch --encrypt --recipient "FRIEND_KEY" test and i am getting the follwoing error: gpg: 421E287E:... (4 Replies)
Discussion started by: risshanth
4 Replies

10. 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
Login or Register to Ask a Question