Using pgp in a shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Using pgp in a shell script
# 1  
Old 09-23-2004
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 think it only works for some commands, and this still pops up:

Are you sure you want to use this public key (y/N)?

Has anyone found a way to use pgp in a shell and suppress the confirmation?
# 2  
Old 09-24-2004
Update:

Chaged the command to:

/opt/pgp-6.5.8/pgp +force -feat Recipient_Pub_Key < file_in.txt > file_out.asc +force +batchmode

Still failed. (It looks like a bug in the +batchmode parameter.)

But...the reason the confirmation message was coming up was that the (recipient's public) key wasn't signed by me. Once I signed the key, the confirmation message wasn't produced and it ran OK.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PGP decryption in UNIX script

Hi, I have an already running Production script that I need to simulate in QA. The script is trying to decrypt some files using the below command: pgp --decrypt ${GET_DIR}/*.pgp --home-dir /.pgp I am getting the following error: 1080:no private key could be found for decryption Can... (3 Replies)
Discussion started by: Jigsaw16
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. Cybersecurity

How to use PGP File Encryption

Hi All, I am new to the concept of encryption and shell and i have been assigned to do pgp encryption of a file before ftping it. I am developing the script using MKS Toolkit on Windows XP and the script will run later on actual unix box. I am going through documents provided by pgp... (2 Replies)
Discussion started by: sandeepb
2 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

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 ... (1 Reply)
Discussion started by: rgard
1 Replies
Login or Register to Ask a Question