Moving script with GpG from one system to another...secret key not available - PGP

This is a discussion on Moving script with GpG from one system to another...secret key not available - PGP ; Hi all, I have a ksh script that was developed using gpg. It uses gpg to encrypt/decrypt a file containing sensative information for viewing. I know the passphrase when it was on the old system, but when I try to ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Moving script with GpG from one system to another...secret key not available

  1. Moving script with GpG from one system to another...secret key not available

    Hi all,

    I have a ksh script that was developed using gpg. It uses gpg to
    encrypt/decrypt a file containing sensative information for viewing.
    I know the passphrase when it was on the old system, but when I try to
    run it on the new system I get errors about the key not being valid:

    Verifying Signature
    gpg: Signature made Thu Oct 03 10:15:10 2002 CDT using DSA key ID
    A820FB5C
    Decrypting file
    gpg: encrypted with ELG-E key, ID 680B66A6
    gpg: decryption failed: secret key not available

    Now since I have all the compnents and I know the passphrase, do I
    just need to re-sign the encrypted file? I tried that using:


    gpg -s

    And it was successful (although it prompted me for my passphrase on
    the new system, not the old one) but it still fails with the above
    error when I try to decrypt the file.

    How can I re-encrypt this file using the old passphrase and put the
    new one in? I fear it may be tied into the private key on the old
    system, which is no longer around

    Any info helpful

  2. Re: Moving script with GpG from one system to another...secret key not available

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    tonij67@hotmail.com (Tonij) writes:

    >I have a ksh script that was developed using gpg. It uses gpg to
    >encrypt/decrypt a file containing sensative information for viewing.
    >I know the passphrase when it was on the old system, but when I try to
    >run it on the new system I get errors about the key not being valid:


    >Verifying Signature
    >gpg: Signature made Thu Oct 03 10:15:10 2002 CDT using DSA key ID
    >A820FB5C
    >Decrypting file
    >gpg: encrypted with ELG-E key, ID 680B66A6
    >gpg: decryption failed: secret key not available


    >Now since I have all the compnents and I know the passphrase, do I
    >just need to re-sign the encrypted file? I tried that using:


    It seems that the secret key still needs to be transferred to the
    second system. Either export it on the old system and import on the
    new, or backup the gnupg keyrings on the old system, and restore on
    the new.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (SunOS)

    iD8DBQFAkRhbvmGe70vHPUMRAl7lAJ9P01rnPmmhMEbqtokMSd wN6bbBqgCg0vrT
    fWjuyxazfwxS3a56dDNIsdY=
    =U5sR
    -----END PGP SIGNATURE-----


  3. Re: Moving script with GpG from one system to another...secret key not available

    Neil W Rickert wrote in message news:...
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > tonij67@hotmail.com (Tonij) writes:
    >
    > >I have a ksh script that was developed using gpg. It uses gpg to
    > >encrypt/decrypt a file containing sensative information for viewing.
    > >I know the passphrase when it was on the old system, but when I try to
    > >run it on the new system I get errors about the key not being valid:

    >
    > >Verifying Signature
    > >gpg: Signature made Thu Oct 03 10:15:10 2002 CDT using DSA key ID
    > >A820FB5C
    > >Decrypting file
    > >gpg: encrypted with ELG-E key, ID 680B66A6
    > >gpg: decryption failed: secret key not available

    >
    > >Now since I have all the compnents and I know the passphrase, do I
    > >just need to re-sign the encrypted file? I tried that using:

    >
    > It seems that the secret key still needs to be transferred to the
    > second system. Either export it on the old system and import on the
    > new, or backup the gnupg keyrings on the old system, and restore on
    > the new.
    >


    I got it worked out, had to recreate the encrypted file and sign it.

    I didnt realize I can backup the gpg keyrings...how do I do that?
    Might have saved some time...

    Thanks for the info,

+ Reply to Thread