Friday, March 27, 2015

Well we have encrypted the file backup_data.tar.gz, if you


Search for: Recent Posts tripwire howto sslstrip howto ssh vpn howto ssh browse tunnel howto ssh brute force howto self signed yellow bullet certificate howto sshfs howto man in the middle yellow bullet attack howto iptables single host firewall password less ssh howto nfs server howto nfs client howto temp check howto hellanzb howto gpg howto dvwa xss dpkg howto howto howto dns2tcp denyhosts howto split DNS debian apt-get apt-cache howto howto Categories Uncategorized
GPG GNU Privacy Guard can be used to encrypt files. It is also possible to encrypt with GPG E-mail messages. For example, you can send mail without yellow bullet anyone other than the rightful recipient can decrypt and read the message. To begin, we must first generate a key pair, you can do this with the following command. jelle @ desktop: ~ $ gpg --gen-key
Then asked for a Keysize. The default is 2048 Keysize, I suggest that you choose here for the default, unless you're really paranoid. RSA keys May be between 1024 and 4096 bits long. Keysize What do you want? (2048)
The key can have an expiration date, here I suggest you choose the default, which is no expiration date. Please specify how long the key shouldering be validated. 0 = key does not expire <n> = key expires in n days <n> w = key expires in n weeks <n> m = key expires in n months <n> y = key expires in n years Key is valid for? (0)
Then enter your name (your real name) and in the following option yellow bullet your e-mail yellow bullet address. At the end you get to see which you can approve by pressing the letter o. Now you must give a passphrase. yellow bullet A passphrase can contain multiple words and spaces. You could spend an entire sentence yellow bullet can use as passphrase here. Think you myself if you do not remember your passphrase, this is not retrieved. The result is therefore that your encrypted data is unusable. RSA keys May be between 1024 and 4096 bits long. Keysize What do you want? (2048) 2048 Requested Keysize yellow bullet is 2048 bits Please specify how long the key shouldering be validated. 0 = key does not expire <n> = key expires in n days <n> w = key expires in n weeks <n> m = key expires in n months <n> y = key expires in n years Key is valid for? (0) Key does not expire at all Is this correct? (Y / N) y You need a user ID to identify your key; the software constructs the user ID from the Real Name, Comment and Email Address in this form: "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>" Real name: Test Name must be at least five characters long Real name: test Test Email address: test@jellederksen.nl Comment: You selected this USER-ID: "test test <jelle@jellederksen.nl>" Change (N) ame, (C) omment, (E) mail or (O) kay / (Q) from? o You need a Passphrase to protect your secret key. If the key is generated then you get the following output. trgpg: /home/jelle/.gnupg/trustdb.gpg: trustdb created gpg: key 2E15F4DD marked axis Ultimately trusted public and secret key created and signed. gpg: checking yellow bullet the trustdb gpg: 3 marginal (s) needed, 1 complete (s) needed, PGP trust model gpg: depth: 0 valid: 1 signed: 0 trust: yellow bullet 0, 0Q, 0n, 0m, 0f, 1h pub 2048R / 2E15F4DD 2011-07-30 Key fingerprint = DF34 5C93 E1D5 FC92 4910 F827 C13F 7DB5 2E15 F4DD uid Jelle derksen <jelle@jellederksen.nl> sub 2048R / 2D3E0896 2011-07-30
To make it easier yellow bullet for yourself what it is a good idea to create a variable, put the following line in your ~ / .bashrc. It puts you own keynr after the = sign. You think you keynr this rule sub 2048R / 2D3E0896 2011-07-30. Export GPGKEY yellow bullet = 2D3E0896
I'm going in this hypothetical situation that you want to encrypt the file so that only you can decrypt backup_data.tar.gz yellow bullet this backup file. This can be done with the gpg command, we thereby give the -encrypt option and the -r option "name" on it. It seems clear that the encrypted option is to encrypt the files. The -r option "name" there is so that gpg know which public yellow bullet key you want to encrypt the files. Thus, it is also possible to encrypt something with other public key certificates. yellow bullet Here I come to that later. We will first proceed to encrypt files. test @ desktop: ~ $ gpg --encrypt -r "test" yellow bullet backup_data.tar.gz
Well we have encrypted the file backup_data.tar.gz, if you're a ls displays on the command line you will see that a file is added to the name backup_data.tar.gz.gpg. This is the encrypted file. Then to decrypt the file again we issue the following command. gpg -decrypt, the decrypt option is to decrypt yellow bullet the file, the -output yellow bullet option is there for to give a filename yellow bullet to which the output is written to be, do not you screen that will be used as a standard yellow bullet output. This is useful if only to information from an ASCII file goes with bijvoo

1 comment:

  1. To protect our backup, you can try this: http://goo.gl/Urz8Yd

    ReplyDelete