How can I easily encrypt a file?
Is there any simple (IE: right click in Nautilus) way to password protect a particular folder/file in Ubuntu? I've got a few files containing sensitive info and I'd much prefer that if/when I leave my computer alone, they aren't accidentally accessed by someone else.
The secruty does not have to be extremely tight. My only concern is that when family/friends come over, I don't really like the idea of them looking at my bank details, accounts or, you guessed it, porn collection.
A simple, effective way to let me put my machine in the hands of someone else knowing that said machine can not cause me embarresment is the sole reason why I'd like to see this in Ubuntu.
Solution 1:
You can use the Archive Manager to zip the file and password protect the zip file.
That is probably the closest thing to right clicking and entering a password that you describe.
To do this right click on the file and choose "Compress" then choose zip as the archive type and in "Other options" you have the option to enter a password.
This is simple to do and stops the problem of someone mounting the file system from a live CD and getting the file that way.
Also you can easily email the file or copy to USB stick, etc without having to worry about having the means to unencrypt the files at the other end, you just need the password.
Solution 2:
If you want to encrypt a lot of files that you access regularly, an encrypted filesystem is the way to go. But if you have single files that you want to encrypt/decrypt quite rarely (say, a list of passwords) you can do it very easily with a right-click in nautilus:
- Install the seahorse-plugins package
- Create a new key for GPG/PGP (Applications - Accessories - Passwords and Encryption Keys)
- After a restart of nautilus (enter
nautilus -q
in a terminal or simply log out of your GNOME session) you have two new entries in your right-click menu: Encrypt and Sign, respectively Decrypt for encrypted files