how to give PASSPHRASE to gpg in command line?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to give PASSPHRASE to gpg in command line?
# 1  
Old 03-15-2009
Bug how to give PASSPHRASE to gpg in command line?

Hello sir,
I am using "gpg" command to encrypt a file.

We generally do it :-
Quote:
gpg -c --cipher-algo aes256 secret.txt
then it asks us for :-
Quote:
Enter Passphrase:
I want to know how to give this Passphrase in the command line itself !!!I did read the man page but couldnt make out what is the option for it.Can u please help me out !!!
# 2  
Old 03-15-2009
The gpg program itself is, like su and sudo, intended to be used interactively and non-scripted. For one possible way to get around that, take a look at the various descriptions of the gpg-agent.

If you want to keep files encrypted on the hard disk (as opposed to sending them around), I suggest taking a look at Linux' crypto-loop or programs like TrueCrypt.
# 3  
Old 03-16-2009
Quote:
Originally Posted by nsharath
Hello sir,
I am using "gpg" command to encrypt a file.

We generally do it :-

then it asks us for :-


I want to know how to give this Passphrase in the command line itself !!!I did read the man page but couldnt make out what is the option for it.Can u please help me out !!!
The passphrase is something to unlock and not to give. So you should unlock it at the startup or like I have it, always unlock Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How do I give permission for the kill command?

<?php $comando = "kill -9 3104"; $output = shell_exec($comando); ?> I am running this web page, but it does not execute the command, in the log file it looks like this: sh: 1: kill: Operation not permitted How do I give permission to execute the command? (1 Reply)
Discussion started by: Rodrigo_Bueno
1 Replies

2. UNIX for Dummies Questions & Answers

Give name for every nth line

Hi all, Greetings. I am facing some troubles and hope that the professionals here could help me. I am handling a large dataset, and part of it is like below: 1 ab139 0 752566 G A 1 ab151 0 846808 T C 1 ab142 0 854250 G A 1 ab061 0 861808 A G 1 ab043 0 873558 T G... (4 Replies)
Discussion started by: Amanda Low
4 Replies

3. UNIX for Dummies Questions & Answers

What will echo $$ command give

Hi I tried giving the following command echo $$a I got an output like 32178a Can some one please explain why echo $$ is returning 32178 Thanks in advance (6 Replies)
Discussion started by: Sri3001
6 Replies

4. Shell Programming and Scripting

Script .ksh to decrypt .gpg(passphrase)

Hi all, i have to make a script in shell unix that decrypt a file .gpg ang through out in the same directory the decypted file. Well, the problem is to put in the shell the passphrase. Here the specifications: File .gpg: bella.zip.gpg File output: bella_decr.zip passphrase: bella_zio ... (4 Replies)
Discussion started by: zangarules
4 Replies

5. Shell Programming and Scripting

Needing to wait for a line on screen and then give input repeatedly

So I have a weird question for my unix shell script. I wrote a shell script that does several things, but one of the things it does is call an executable. The executable then proceeds to start asking me questions, which it won't proceed until an input is entered. The answer to the questions is... (4 Replies)
Discussion started by: HelpMeProgram
4 Replies

6. UNIX for Dummies Questions & Answers

Give the command names

Hiii, I have a requiremnt like this---- Please provide the current sever capacity and the % of utilization for each of the servers used by your respective applications. Also please provide the list of applications running on each of the unix server can you please help me out in this. (2 Replies)
Discussion started by: namishtiwari
2 Replies

7. Shell Programming and Scripting

if i give this command what would be the value...

if i give dir=/tmp/${0##*/} what would b the value stored in dir ..i'm more concerned about the 0##*/ part.. (1 Reply)
Discussion started by: suri
1 Replies

8. Shell Programming and Scripting

want to specific line which i will give through variable

Hi, I have a file on unix which contains -------------------------------------- 1 # Do not remove the following line, or various programs 2 # that require network functionality will fail. 3 127.0.0.1 romhelp3 localhost.localdomain localhost 4 ... (2 Replies)
Discussion started by: srikanthus2002
2 Replies

9. AIX

command to give me Database

Which is command I could used, to give me the kind of database ,size of database and version of database ? (4 Replies)
Discussion started by: magasem
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