Problem solve Get help with specific problems with your technologies, process and projects.

Encrypt data using a public key

How can I make a user enter a key or password to get access to .tar files in Unix? For example, I have a program and all my scripts are in A.tar archive. I want users to enter a password or key to extract A.tar. This need to work on Linux, Solairs, HP-UX, AIX and maybe on Uss systems.
Why don't you look into GPG, which is the GNU version of PGP (Pretty Good Privacy)? This will allow you to encrypt data easily using a public key. There are several steps, including creating a key, exporting it to your textfile, encrypting the data, and later the decryption process.

The encryption syntax would be something like this.

gpg --recipient "RECIPIENT" --encrypt-files "yourfilename"

Here's an FAQ that will be helpful to you.

This was last published in May 2005

Dig Deeper on Linux servers



Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.