If you store important information on your Linux server and want to make sure it is for your eyes only you need to password protect these files. Ja jūs glabājat svarīgu informāciju par jūsu Linux servera un vēlaties, lai pārliecinātos, ka tā ir jūsu acis, tikai jums ar paroli aizsargāt šos failus. Let's see how you can do this with Linux. Let's redzēt, kā jūs varat izdarīt ar Linux.
First, pick a good password. Pirmkārt, izvēlēties labu paroli. There are a few websites on the Internet that help you generate strong passwords. Ir dažas tīmekļa vietnes, par internetu, kas palīdzēs jums radīt stipras paroles. Try and pick an alphanumeric password. Izmēģināt un izvēlēties burtciparu paroli. Something such as Rv7fkcxASW8h would be a good choice. Kaut kā Rv7fkcxASW8h būtu laba izvēle.
Now check to see if you have the package gpg installed on your computer. Tagad pārbaudiet, vai jums ir pakete gpg instalēta jūsu datorā. Run the following command to check: Palaist šādu komandu, lai pārbaudītu:
# whereis gpg # Whereis GPG
gpg: /usr/bin/gpg /usr/share/man/man1/gpg.1.gz GPG: / usr / bin / GPG / usr/share/man/man1/gpg.1.gz
If you get an output like the one shown above it means you have the required package installed. Ja Jums izejas kā vienu norādīts iepriekš, tas nozīmē, jums ir nepieciešama pakete uzstādīta. If not, check your Linux distribution's documentation to see how you can install the GPG package. Ja ne, pārbaudiet savu Linux izplatīšanas dokumentāciju, lai redzētu, kā jūs varat instalēt GPG paketi.
Say you want to password protect a file called dbbackup.zip with the password Rv7fkcxASW8h here's how you would go about it: Ka vēlaties ar paroli aizsargāt failu ar nosaukumu dbbackup.zip ar paroli Rv7fkcxASW8h Lūk, kā jūs varētu iet par to:
# gpg -c dbbackup.zip # GPG-c dbbackup.zip
When you enter this you will be requested to enter a passphrase, which is the password you want to protect the file with. Ievadot, jums tiks lūgts ievadīt paroli, kura paroli vēlaties aizsargāt failu ar. Enter the password twice. Ievadiet paroli divas reizes. Now you should see a file called dbbackup.zip.gpg in the same directory as the original file. Tagad jums vajadzētu redzēt faila nosaukumu dbbackup.zip.gpg šajā pašā direktorijā, kā oriģinālā. This is the encrypted and password protected copy of the original file. Šī ir šifrēta un aizsargāta ar paroli kopiju oriģinālo failu. You can store this file on your hard drive or ship it to someone on a DVD knowing that it will be very hard and nearly impossible for most people to crack it. Jūs varat saglabāt šo failu uz cietā diska vai nosūtīt to kādam uz DVD, zinot, ka tas būs ļoti grūti un gandrīz neiespējami vairums cilvēku kreka to.
When you want to read the file you will need to remove the password protected encryption. Ja vēlaties nolasīt failu, jums būs nepieciešams novērst aizsargāta ar paroli šifrēšanu. For that execute the following command: Šim izpildīt šādu komandu:
gpg dbbackup.zip.gpg GPG dbbackup.zip.gpg
You will be asked to enter the password using which the file was protected. Jums tiks prasīts ievadīt paroli, izmantojot kuras fails ir aizsargāts. Enter that and you should be in business. Ievadiet to un jums ir biznesā. Note that this only works for files and not for folders. Ņemiet vērā, ka tas darbojas tikai failus nevis mapes. You should create a zip or tar archive of the files you want to secure and then add the password protected encryption to it. Jums vajadzētu izveidot zip vai tar arhīva failu, kuru vēlaties, lai nodrošinātu un tad pievieno aizsargāta ar paroli šifrēšanu, lai to.























Thanks a lot i was looking for this command from last week. Thanks daudz es meklēju šo komandu no pagājušajā nedēļā. Ultimately find it at your website. Galu galā atrast jūsu mājas lapā.