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.

Dig Deeper on Linux servers

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.

Please create a username to comment.