In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to encrypt files in the Ubuntu system", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to encrypt files in the Ubuntu system" bar!
This article introduces an integrated desktop environment based on Ubuntu Desktop 9.10 (i386) and GNOME. And set up two computers installed with Ubuntu 9.10 desktop version, Host1 and Host2, both installed OpenSSH software package and have the same user account (user name and password are the same for convenience of description).
Preparation: install the Seahorse key Manager plug-in
By default, the Ubuntu 9.10 GNOME integrated desktop environment software does not come with the Seahorse key Manager plug-in (seahorse-plugins), so in the Nautilus file browser, after selecting a file and clicking the right mouse button, you will not see the options "encrypt" and "sign" in the pop-up shortcut menu As a result, it is not possible to encrypt or sign files through a graphical interface (the plug-in is integrated in the Nautilus file browser).
To do this, we can install the plug-in manually using the "apt-get" command or the Synaptic package Manager. Take the use of command-line installation as an example. Click the menu "Application → attachment → Terminal", open the GNOME terminal window and enter the following command: "sudo apt-get install seahorse-plugins". After the command execution, you can download and install the "seahorse-plugins" package. After the installation is complete, log out of the current system and log back in, and you can see "encrypt" and "sign" items in the shortcut menu described above.
To encrypt or sign a file, first create a key for the corresponding user. The keys created are a pair, divided into public and private keys. The public key is usually released and the file is encrypted by other users. After receiving the encrypted file sent by other users, use your own private key to decrypt it.
Step 1. Create a local user key in Host1
Click the menu "Application → attachment → password and encryption key" to run the Seahorse key management program. In the password and encryption key window that appears, click the menu "File → New" and the "New" key dialog box appears. Because we are encrypting the file, according to the instructions, select the type of key created as "PGP key" and click the "continue" button to enter the "New PGP key" dialog box. When you create a key, you need to specify the user's personal information, such as user name, e-mail, and so on, as well as the encryption type and secret strength of the key. After filling in, click the "create" button and enter the key protection password to create the user key.
Step 2. Distribute the public key to Host2 users
First, use the Seahorse key manager to export the public key you just created. Click "File → Export" in the "key and encrypted password" window, and then click the "Save" button after exporting the public key, then the public key file "testuser.asc" is generated under the directory of the currently logged-in user (testuser). Next, we transfer the public key file to the Host2 host (here we use the "scp" command as an example).
Open a GNOME terminal window on Host1 and enter the command "scp testuser.Asc testuser@Host2:~/.". After execution, first enter "y" to join the host Host2 to the list of trusted hosts, then enter the password of the user "testuser" on Host2, and then copy the "testuser.asc" file on Host1 to the testuser user directory of the Host2 host (/ home/testuser). After the user on the Host2 receives the key file, click "File → Import" in the "key and encrypted password" window in the Seahorse key Manager, find the file "testuser.asc" in the currently logged-in user directory and open it, and then complete the import.
Step 3. Host2 users encrypt files to be sent
With the Host1 user's public key, you can use it to encrypt files on Host2. In the Nautilus file browser, right-click the file to be encrypted, select "encrypt" from the pop-up shortcut menu, and the "Select recipient" dialog box pops up (as shown in figure 3). The keys available in the current system will be automatically listed in the key list, select the public key of the Host1 user you just imported, check the box in front of it, click the "OK" button, then start encrypting the file and generate a franchise file (such as "abc.pgp") at the end of the ".pgp" file name.
Similarly, use the "scp" command to transfer the encrypted file to "scp abc.pgp testuser@Host1:~/." in Host1.
Step 4. Host1 users decrypt the received files
After the user on Host1 receives the encrypted file from the Host2 user, right-click the file in the Nautilus file browser, select "Open with decrypted file" in the pop-up shortcut menu, enter the key protection password as required, the program will use the user's private key to decrypt the file, and generate the decrypted file under the current directory, that is, restore the encrypted file of the Host2 user.
Thank you for reading, the above is the content of "how to encrypt files in the Ubuntu system". After the study of this article, I believe you have a deeper understanding of how to encrypt files in the Ubuntu system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.