PGP commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting PGP commands
# 1  
Old 11-17-2005
PGP commands

i have successfully executed a PGP encrytp command with the following:

"echo `pgp --encrypt filename --recipient user-key` > $fromDir/.encrypt"

However, when i attempt to issue a decrypt command with following:

"echo `pgp --decrypt filename --passphrase passphrase`" > $fromDir/.decrypt

i get nothing. All files and directories referenced are present and, like the encrypt command, this command works fine when entered on a command line. What am i missing?
# 2  
Old 11-20-2005
I don't know about the problem because I don't usually use pgp, but it seems like the echo command is redundant. If the pgp produces output on stdout, why echo it? Just redirect it into the file.

Actually, it seems like your double-quotes are in the wrong place. But your extra echoing seems to be confusing matters, and breaking your script.
-Mike
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PGP generating keys.

Hi Guys, Am facing issue in generating PGP keys. Can you please help me to figure this out?? I fired the below command to generate keys. The log say keys successfully created. But when i tried to list it doesnt shows me the keys created. pgp --gen-key "pgptest<ram@gmail.com>"... (3 Replies)
Discussion started by: Vinoth Kumar G
3 Replies

2. Linux

Pgp encryption script

I have file in linux which I need to do the PGP encryption. Through manually I am using this command to do the same gpg -c scsrun.log Enter passphrase : Repeat Passphrase : But how I can achive this using linux script. Thanks How to use code tags (3 Replies)
Discussion started by: mr_harish80
3 Replies

3. Shell Programming and Scripting

pgp extension file

Hello all Generate key: gpg --gen-key and follow onscreen prompts List Keys: gpg --list-keys Import the key: gpg --import ken-pgp.key.txt Trust the Key: gpg --edit-key support@ken.com trust Encrypt the file: gpg -r support@ken.com-e test2 I have used the above commands to generate the... (1 Reply)
Discussion started by: vasuarjula
1 Replies

4. Solaris

PGP encryption

Hi, i am trying to encrypt a file using pgp with a recepient's public key. The file is encrypted but the output file has owner & group nobody. i am not able to change it either. Please let me know how to do pgp encryption so that i get the output with owner and group as the same user which runs... (4 Replies)
Discussion started by: renjyverghese
4 Replies

5. HP-UX

PGP query with SDA

Hi I have a requirement to have a script which will encrypt a file on my HPUX server in such a way that the receiver of the file only has to enter a passphrase to decrypt (no swapping of keys, etc.) Ideally, I want to use some free software to perform the task. From what I have read so far, the... (0 Replies)
Discussion started by: errigal
0 Replies

6. Web Development

Apache 2.2 PGP Validation

Hello, I have read through APACHE's help documents on verifying the integrity of the files using PGP but I am completely lost. I have never used PGP before so I am not sure what to do. It says: he PGP signatures can be verified using PGP or GPG. First download the KEYS as well as the asc... (1 Reply)
Discussion started by: mojoman
1 Replies

7. UNIX for Dummies Questions & Answers

PGP Auto Respond

This is relating PGP: I wrote a shell script to encrypt a file: pgpe -r <key> (file) Im looking to automate this but when I run my script it keeps running because it prompts: WARNING: The above key is not trusted to belong to: Do you want to use the key with this name? It's... (1 Reply)
Discussion started by: queenie680
1 Replies

8. UNIX for Advanced & Expert Users

Importing PGP keys

I'm hoping someone can help get me moving in the right direction here, so bear with me. I've got 2 RedHat Linux servers, let's call them A & B. - A receives "sensitive" files, which are PGP encrypted, and immediately sends them off to B for decryption/processing/deletion - B needs to make... (1 Reply)
Discussion started by: peteroc
1 Replies

9. UNIX for Advanced & Expert Users

pgp encryption

Hi I have one script for doing the gpg encryption on linux. The encrytion is doing fine when i am running the script from command prompt on linux The same script when it is triggering from mainframe using sysopts option in NDM(connect direct) the encryption step in the shell script is... (0 Replies)
Discussion started by: Arvind Maurya
0 Replies

10. Shell Programming and Scripting

Using pgp in a shell script

This may be more of a PGP (Pretty Good Privacy) question than Unix, but here's hoping. The statement I'm using to compress a file is: /opt/pgp-6.5.8/pgp +force -feat MY_Pub_Key < file_in.txt > file_out.asc The +force parameter is documented as "Eliminating confirmation questions", but I... (1 Reply)
Discussion started by: abNORMal
1 Replies
Login or Register to Ask a Question