Sponsored Content
Top Forums Shell Programming and Scripting Script .ksh to decrypt .gpg(passphrase) Post 302508541 by fpmurphy on Monday 28th of March 2011 12:06:20 PM
Old 03-28-2011
One way:
Code:
cat passphrase.txt | gpg --passphrase-fd 0 --output out.txt -d bella.txt.zip.gpg

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Encrypt and Decrypt script

Dear Experts, I am using one script name :volume.sh and its written in bash shell script. I just want to encrypt the script so that any one else cannot see it. please tell me the commands how to encrypt the script as well as to decrypt it. Regards, SHARY (9 Replies)
Discussion started by: shary
9 Replies

2. UNIX for Dummies Questions & Answers

follow-up question on passphrase and script

can i use key with passphrase on a script/batch process? i am not sure how to pass the pasphrase in the script. i'd like to automate secure file transfer. thanks in advance (0 Replies)
Discussion started by: NoelSacay
0 Replies

3. UNIX for Dummies Questions & Answers

how to give PASSPHRASE to gpg in command line?

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 !!! (2 Replies)
Discussion started by: nsharath
2 Replies

4. UNIX for Advanced & Expert Users

Decrypt a GPG file through shell script

Hi, I'm trying to decrypt a gpg file thorugh a shell script. But i' could'nt. My script is , -sh-3.1$ cat test_gpg.sh #!/bin/ksh echo " Hello, iam testing GPG" gpg prabhu.txt.gpg <<EOF prompt prabhu EOF exit 0 The file i'm trying to decrypt is prabhu.txt.gpg and my passphrase is... (1 Reply)
Discussion started by: apsprabhu
1 Replies

5. Shell Programming and Scripting

shell script encrypt a file using gpg

Hi, I have a requirement to encrypt a file using gpg with a public key. However when i encrypt a file, i get a question like 'Do you want to go ahead with unverified user?' . when i press 'y' file is encrypted. I am not able to automate this job because of this interactive mode. Could... (3 Replies)
Discussion started by: Deepakbabu
3 Replies

6. Shell Programming and Scripting

Need to decrypt a file in a directory (SHL script)

I need to decrypt a file in a directory, I need to write a shl scrip & cron job How I find the files in the directory: the file is like this: dailypayments_sfs_payment_201011151800.dat -d The decrypt command: gpg -o dailypayments_sfs_payment_201011151800.dat -d 20101115 (the date... (7 Replies)
Discussion started by: rechever
7 Replies

7. Shell Programming and Scripting

Bash Script to decrypt encrypt log and archive

Hi Please see if you have come across any aprts of this. I can read, integrate and syntehsixe. Any help you could offer me would be super. thanks in advance! Good day. Thank you for your response in this matter. Here are some further details: 1) scripting is to be in BASH... (1 Reply)
Discussion started by: cdc01
1 Replies

8. Shell Programming and Scripting

Encrypt and decrypt a password in shell script

Hi All, very good morning all. I am trying to connect to informatica repository by using shell script. I have written pmrep connect command in the script file. But i need to provide repository, domain ,username and password to connect. Username and password are hard coded in the script... (8 Replies)
Discussion started by: SekhaReddy
8 Replies

9. Shell Programming and Scripting

Encrypt and decrypt the password in a Shell Script

Hello, I have the following UNIX shell script which connects to the teradata database and executes the SQL Queries. For this, I am passing database name, username and password. I don't want to reveal my password to anyone. So, is there any way that I can encrypt my password and read the... (2 Replies)
Discussion started by: ronitreddy
2 Replies

10. Shell Programming and Scripting

Supply passphrase for ssh in script

I would like to write a bash shell script which will connect to remote server using passphrase. (I have public-private infrastructure created, and as per instruction, I must not use password less ssh). This particular script will be fired from cron. Can you please advice how I can supply the... (2 Replies)
Discussion started by: atanubanerji
2 Replies
AMCRYPT(8)						  System Administration Commands						AMCRYPT(8)

NAME
amcrypt - reference crypt program for Amanda symmetric data encryption SYNOPSIS
amcrypt DESCRIPTION
amcrypt requires aespipe, uuencode and gpg to work. Aespipe is available from : http://loop-aes.sourceforge.net amcrypt will search for the aespipe program in the following directories: /usr/bin:/usr/local/bin:/sbin:/usr/sbin. amcrypt calls amaespipe and pass the passphrase through file descriptor 3. The passphrase should be stored in ~amanda/.am_passphrase. HOW TO CREATE ENCRYPTION KEYS FOR AMCRYPT
1. Create 65 random encryption keys and encrypt those keys using gpg. Reading from /dev/random may take indefinitely long if kernel's random entropy pool is empty. If that happens, do some other work on some other console (use keyboard, mouse and disks). head -c 2925 /dev/random | uuencode -m - | head -n 66 | tail -n 65 | gpg --symmetric -a > ~amanda/.gnupg/am_key.gpg This will ask for a passphrase. Remember this passphrase as you will need it in the next step. 2. Store the passphrase inside the home-directory of the AMANDA-user and protect it with proper permissions: echo my_secret_passphrase > ~amanda/.am_passphrase chown amanda:disk ~amanda/.am_passphrase chmod 700 ~amanda/.am_passphrase KEY AND PASSPHRASE
amcrypt uses the same key to encrypt and decrypt data. It is very important to store and protect the key and the passphrase properly. Encrypted backup data can only be recovered with the correct key and passphrase. SEE ALSO
amanda(8), amanda.conf(5), aespipe(1), amaespipe(8), gpg(1) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHOR
Kevin Till <kevin.till@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.3 01/10/2013 AMCRYPT(8)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy