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. Hvis du lagrer viktig informasjon på din Linux-server og vil sørge for at det er for øynene bare du trenger å passordbeskytte disse filene. Let's see how you can do this with Linux. La oss se hvordan du kan gjøre dette med Linux.
First, pick a good password. Først velger et godt passord. There are a few websites on the Internet that help you generate strong passwords. Det er noen nettsteder på Internett som hjelper deg å generere sterke passord. Try and pick an alphanumeric password. Prøv og plukke en alfanumerisk passord. Something such as Rv7fkcxASW8h would be a good choice. Noe som Rv7fkcxASW8h ville være et godt valg.
Now check to see if you have the package gpg installed on your computer. Nå sjekk for å se om du har pakken gpg installert på datamaskinen. Run the following command to check: Kjør følgende kommando for å sjekke:
# 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. Hvis du får en produksjon som vist ovenfor, betyr det at du har de nødvendige pakken installert. If not, check your Linux distribution's documentation to see how you can install the GPG package. Hvis ikke, sjekk din Linux-distribusjon dokumentasjon for å se hvordan du kan installere GPG pakken.
Say you want to password protect a file called dbbackup.zip with the password Rv7fkcxASW8h here's how you would go about it: Si at du ønsker å passordbeskytte en fil som heter dbbackup.zip med passordet Rv7fkcxASW8h her er hvordan du vil gå om det:
# 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. Når du går inn på denne vil du bli bedt om å oppgi et passord, som er passordet du vil beskytte filen med. Enter the password twice. Skriv inn passordet to ganger. Now you should see a file called dbbackup.zip.gpg in the same directory as the original file. Nå burde du se en fil som heter dbbackup.zip.gpg i samme mappe som den opprinnelige filen. This is the encrypted and password protected copy of the original file. Dette er kryptert og passordbeskyttet kopi av den originale filen. 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. Du kan lagre denne filen på harddisken eller sende den til noen på en DVD vite at det vil være svært vanskelig og nesten umulig for folk flest å knekke den.
When you want to read the file you will need to remove the password protected encryption. Når du ønsker å lese filen må du fjerne passordbeskyttet kryptering. For that execute the following command: For at den følgende kommando:
gpg dbbackup.zip.gpg gpg dbbackup.zip.gpg
You will be asked to enter the password using which the file was protected. Du vil bli bedt om å angi passordet ved hjelp der filen ble fredet. Enter that and you should be in business. Skriv det og du bør være i virksomhet. Note that this only works for files and not for folders. Merk at dette kun fungerer for filer og ikke for mapper. You should create a zip or tar archive of the files you want to secure and then add the password protected encryption to it. Du bør lage en zip eller tar-arkiv av filene du ønsker å sikre og deretter legge til passordbeskyttet kryptering til det.























Thanks a lot i was looking for this command from last week. Thanks a lot jeg var på utkikk etter denne kommandoen fra forrige uke. Ultimately find it at your website. Til syvende og sist finne det på nettstedet.