How to encrypt/decrypt any file in Solaris:
- Identify the file need to be encrypted
- Use “crypt < filename > encrypted_file_name”
- This process will ask for a key – this will become password to open that file.
- Note that while encrypting the file, the original file will be deleted.
- Next is how to read that encrypted file:
- Use “crypt < encrypted_file_name”
- This process will ask for same password which was given initially while encrypting the file.
Input data file:
unixgeek(staff)@server1[66]> cat important
THis is an important file!
To encrypt:
unixgeek(staff)@server1[67]> crypt < important > out
Enter key: UNIXTEAM Note:: “UNIXTEAM” will become password to decrypt this file.
To Decrypt:
unixgeek(staff)@server1[68]> crypt < out
Enter key: UNIXTEAM Note:: Same password to decrypt this file as given during encrypting the file.
THis is an important file!
Enjoy!!! :)
No comments:
Post a Comment