<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GPG decrypting thru HP-UX shell script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633868#M97061</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to create a shell script on hp-ux 11i that uses GPG to decrypt a file someone else encrypts with my key on a routine basis.  I can not get the script to decrypt the file without asking for a passphrase, and am having difficulty trying to feed the passphrase so that GPG can decrypt the file.  Does anyone know how I can feed the passphrase or have the script decrypt the file without asking for a passphrase?&lt;BR /&gt;&lt;BR /&gt;Any help would greatly be appreciated,&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Fri, 23 Sep 2005 20:28:58 GMT</pubDate>
    <dc:creator>Hugo Capinha</dc:creator>
    <dc:date>2005-09-23T20:28:58Z</dc:date>
    <item>
      <title>GPG decrypting thru HP-UX shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633868#M97061</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to create a shell script on hp-ux 11i that uses GPG to decrypt a file someone else encrypts with my key on a routine basis.  I can not get the script to decrypt the file without asking for a passphrase, and am having difficulty trying to feed the passphrase so that GPG can decrypt the file.  Does anyone know how I can feed the passphrase or have the script decrypt the file without asking for a passphrase?&lt;BR /&gt;&lt;BR /&gt;Any help would greatly be appreciated,&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 23 Sep 2005 20:28:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633868#M97061</guid>
      <dc:creator>Hugo Capinha</dc:creator>
      <dc:date>2005-09-23T20:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: GPG decrypting thru HP-UX shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633869#M97062</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Encrypting files from within PHP&lt;BR /&gt;--------------------------------&lt;BR /&gt;After running this script you will find 'secret_file.txt.gpg' in your directory.&lt;BR /&gt;&lt;BR /&gt;    $gpg = '/usr/bin/gpg'; &lt;BR /&gt;    $recipient = 'john@doe.com'; &lt;BR /&gt;    $secret_file = 'secret_file.txt'; &lt;BR /&gt;&lt;BR /&gt;    echo shell_exec("$gpg -e -r $recipient $secret_file"); &lt;BR /&gt;?&amp;gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This script takes the value of $argv[1], the first argument after the script name, and passes it to GnuPG for encrypting&lt;BR /&gt;&lt;BR /&gt;    $gpg = '/usr/bin/gpg'; &lt;BR /&gt;    $recipient = 'john@doe.com'; &lt;BR /&gt;    $encrypted_file = 'foo.gpg'; &lt;BR /&gt;&lt;BR /&gt;    shell_exec("echo $argv[1] | $gpg -e -r $recipient -o $encrypted_file"); &lt;BR /&gt;?&amp;gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Sep 2005 18:57:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633869#M97062</guid>
      <dc:creator>Hakan Aribas</dc:creator>
      <dc:date>2005-09-24T18:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: GPG decrypting thru HP-UX shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633870#M97063</link>
      <description>We are running the script on solaris that does encrypt using &lt;BR /&gt;&lt;BR /&gt;gpg -v -e -r "encryption key " -o encryptedfile org_file &lt;BR /&gt;&lt;BR /&gt;and decrypting when file is received using&lt;BR /&gt;&lt;BR /&gt;gpg -v -d -r "decrypt key " -o decrypted_file recd_org_encrypted_file&lt;BR /&gt;&lt;BR /&gt;Is this something you are looking for? With gpg, you must use the key/paraphrase to decrypt the file.&lt;BR /&gt;&lt;BR /&gt;hope this helps...</description>
      <pubDate>Sun, 25 Sep 2005 16:19:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633870#M97063</guid>
      <dc:creator>monasingh_1</dc:creator>
      <dc:date>2005-09-25T16:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: GPG decrypting thru HP-UX shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633871#M97064</link>
      <description>monasingh,&lt;BR /&gt;&lt;BR /&gt;I have tried your suggestion, but still get prompted for a passphrase ("You need a passphrase to unlock the secret key for...").  Any other suggestions?</description>
      <pubDate>Mon, 26 Sep 2005 08:59:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633871#M97064</guid>
      <dc:creator>Hugo Capinha</dc:creator>
      <dc:date>2005-09-26T08:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: GPG decrypting thru HP-UX shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633872#M97065</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try&lt;BR /&gt;&lt;BR /&gt;echo "[YOUR PASSPHRASE]" | gpg -o [OUTPUTFILE] --batch --passphrase-fd 0 -d [INPUTFILE]&lt;BR /&gt;&lt;BR /&gt;where [YOUR PASSPHRASE] has to be replaced with your passphrase, [INPUTFILE] has to be replaced with the full pathname of the encrypted file, and [OUTPUTFILE] has to be replaced with the full pathname of the decrypted file. &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Gunnar.&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:58:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633872#M97065</guid>
      <dc:creator>Gunnar Schwant</dc:creator>
      <dc:date>2007-01-03T05:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: GPG decrypting thru HP-UX shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633873#M97066</link>
      <description>Which GPG ("gpg --version")?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] am having difficulty trying to feed&lt;BR /&gt;&amp;gt; the passphrase [...]&lt;BR /&gt;&lt;BR /&gt;What did you try?  What happened?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnupg.org/(en)/documentation/index.html" target="_blank"&gt;http://www.gnupg.org/(en)/documentation/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;On:&lt;BR /&gt;&lt;A href="http://www.gnupg.org/(en)/documentation/manpage.en.html" target="_blank"&gt;http://www.gnupg.org/(en)/documentation/manpage.en.html&lt;/A&gt;&lt;BR /&gt;I see:&lt;BR /&gt;&lt;BR /&gt;[...]&lt;BR /&gt;--passphrase-fd n&lt;BR /&gt;&lt;BR /&gt;Read the passphrase from file descriptor n.&lt;BR /&gt;If you use 0 for n, the passphrase will be&lt;BR /&gt;read from stdin. This can only be used if&lt;BR /&gt;only one passphrase is supplied.&lt;BR /&gt;Don't use this option if you can avoid it.&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;I haven't looked at the GPG code for this,&lt;BR /&gt;but it seems likely (or at least plausible)&lt;BR /&gt;that it attempts (by default, expecting&lt;BR /&gt;interactive input) to read the passphrase&lt;BR /&gt;from /dev/tty rather than from stdin.&lt;BR /&gt;&lt;BR /&gt;Of course, this option tends to lead to&lt;BR /&gt;people storing a passphrase in some script&lt;BR /&gt;somewhere, which is an obvious security&lt;BR /&gt;problem, hence the discouragement in the&lt;BR /&gt;documentation.&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Jan 2007 11:04:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/gpg-decrypting-thru-hp-ux-shell-script/m-p/3633873#M97066</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-01-03T11:04:37Z</dc:date>
    </item>
  </channel>
</rss>

