Skip to content Prejsť na obsah


How to password protect files in Linux Ako sa chrániť heslom súbory v Linuxe

LinuxBezpečnosť

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. Ak máte uchovávať dôležité informácie na serveri Linux, a chcem, aby sa ubezpečil, že je len pre vaše oči, čo potrebujete ochrániť heslom tieto súbory. Let's see how you can do this with Linux. Uvidíme, ako to možno urobiť s operačným systémom Linux.

First, pick a good password. Najskôr vyberte dobrého hesla. There are a few websites on the Internet that help you generate strong passwords. Existuje niekoľko webových stránok na Internete, ktoré vám pomôžu vytvárať silné heslá. Try and pick an alphanumeric password. Skúste vybrať a alfanumerické heslo. Something such as Rv7fkcxASW8h would be a good choice. Niečo ako Rv7fkcxASW8h by bolo dobrou voľbou.

Now check to see if you have the package gpg installed on your computer. Teraz skontrolujte, či máte balík gpg nainštalované v počítači. Run the following command to check: Spustite nasledujúci príkaz skontrolovať:

# 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. Ak sa vám výkon, ako je uvedené vyššie to znamená, že máte nainštalovaný požadovaný balík. If not, check your Linux distribution's documentation to see how you can install the GPG package. Ak nie, skontrolujte linuxovou distribúciu v dokumentácii, ako si môžete nainštalovať balík JRC.

Say you want to password protect a file called dbbackup.zip with the password Rv7fkcxASW8h here's how you would go about it: Povedzme, že chcete ochrániť heslom súboru s názvom dbbackup.zip s heslom Rv7fkcxASW8h Tu je návod, ako by šlo o 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. Akonáhle otvorte túto budete vyzvaní na zadanie passphrase, čo je heslo, ktoré chcete chrániť súbor. Enter the password twice. Zadajte dvakrát heslo. Now you should see a file called dbbackup.zip.gpg in the same directory as the original file. Teraz by ste mali vidieť súbor s názvom dbbackup.zip.gpg v rovnakom adresári ako pôvodný súbor. This is the encrypted and password protected copy of the original file. Toto je šifrované a chránené heslom kópiu pôvodného súboru. 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. Môžete uložiť tento súbor na pevnom disku alebo loďou, aby niekto na DVD s vedomím, že bude veľmi ťažké a takmer nemožné, pre väčšinu ľudí to bezva.

When you want to read the file you will need to remove the password protected encryption. Keď chcete prečítať súbor budete musieť odstrániť chránené heslom šifrovanie. For that execute the following command: Pre tento spustite nasledujúci príkaz:

gpg dbbackup.zip.gpg gpg dbbackup.zip.gpg

You will be asked to enter the password using which the file was protected. Budete vyzvaní na zadanie hesla, ktoré používate súbor bol chránený. Enter that and you should be in business. Zadajte, a že by ste mali byť v podnikaní. Note that this only works for files and not for folders. Všimnite si, že to funguje iba pre súbory a nie pre priečinky. You should create a zip or tar archive of the files you want to secure and then add the password protected encryption to it. Mali by ste sa vytvorí zip alebo tar archív súborov, ktoré chcete zabezpečiť a potom pridať chránený heslom šifrovanie na to.

Posted in Publikované v Linux Linux , , Security Bezpečnosť . .

Get Simple Help tutorials just like this one in your email inbox every day - for free! Get Help jednoduchá cvičenie, rovnako ako to vo vašej e-mailovej schránky každý deň - zadarmo! Just enter your email address below: Stačí zadať e-mailovú adresu:

You can always opt out of this email subscription at any time. Vždy sa môžete odhlásiť z tohto e-mailu predplatného kedykoľvek.

3 Responses 3 Odpovede

Stay in touch with the conversation, subscribe to the Zostať v kontakte s konverzácia, prihláste sa RSS feed for comments on this post RSS kanál pre komentáre k tomuto príspevku . .

  1. IT Buzz IT Buzz says hovorí

    Thanks a lot i was looking for this command from last week. Díky moc som hľadal pre tento príkaz z minulého týždňa. Ultimately find it at your website. Nakoniec nájsť na vašich webových stránkach.

Continuing the Discussion Pokračovanie Diskusia

  1. | Standalone Sysadmin | Samostatné sysadmin linked to this post on June 29, 2009 súvisiacich s touto poštou dňa 29. júna 2009

    [...] to ssh authentication. [...] Na ssh autentizace. If you want to learn more about how to use it, Simple Help has a tutorial on it, covering the very basic usage. Ak sa chcete dozvedieť viac o tom, ako ju používať, Simple Pomoc je tutoriál na tom, pokrývajúce základné použitie. Once you're comfortable with that, check out the [...] Akonáhle sa Vám, že check-out [...]

  2. Password-protect files in Linux « Linux & Stuff Heslo-chrániť súbory v Linuxe "Linux & Stuff linked to this post on July 1, 2009 súvisiacich s touto poštou dňa 1.júla 2009

    [...] in CLI, password | Tags: CLI, password Here's a useful CLI to enable protecting special files in your system. [...] V CLI, heslo | Štítky: CLI, heslo Tu je užitočné CLI umožní chrániť špeciálne súbory vo vašom systéme. To protect file.txt just run [...] Chrániť soubor.txt práve beží [...]



Some HTML is OK Niektoré HTML je v poriadku

or, reply to this post via alebo odpovede na tento príspevok prostredníctvom trackback Trackback . .