Guest User

Untitled

a guest
Apr 4th, 2018
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. ## Generating GPG Key
  2.  
  3. ```console
  4. $ gpg --gen-key
  5. ```
  6.  
  7. ```bash
  8. gpg (GnuPG) 1.4.22; Copyright (C) 2015 Free Software Foundation, Inc.
  9. This is free software: you are free to change and redistribute it.
  10. There is NO WARRANTY, to the extent permitted by law.
  11.  
  12. Please select what kind of key you want:
  13. (1) RSA and RSA (default)
  14. (2) DSA and Elgamal
  15. (3) DSA (sign only)
  16. (4) RSA (sign only)
  17. Your selection? 1
  18. ```
  19.  
  20. ```bash
  21. RSA keys may be between 1024 and 4096 bits long.
  22. What keysize do you want? (2048) 4096
  23. Requested keysize is 4096 bits
  24. ```
  25.  
  26. ```bash
  27. Please specify how long the key should be valid.
  28. 0 = key does not expire
  29. <n> = key expires in n days
  30. <n>w = key expires in n weeks
  31. <n>m = key expires in n months
  32. <n>y = key expires in n years
  33. Key is valid for? (0) 0
  34. Key does not expire at all
  35. Is this correct? (y/N) y
  36. ```
  37.  
  38.  
  39. ```bash
  40. You need a user ID to identify your key; the software constructs the user ID
  41. from the Real Name, Comment and Email Address in this form:
  42. "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
  43.  
  44. Real name: Peerapong Samarnpong
  45. Email address: peerapong_sam@hotmail.com
  46. Comment:
  47. You selected this USER-ID:
  48. "Peerapong Samarnpong <peerapong_sam@hotmail.com>"
  49.  
  50. Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
  51. ```
  52. ```bash
  53. You need a Passphrase to protect your secret key.
  54.  
  55. You don't want a passphrase - this is probably a *bad* idea!
  56. I will do it anyway. You can change your passphrase at any time,
  57. using this program with the option "--edit-key".
  58.  
  59. We need to generate a lot of random bytes. It is a good idea to perform
  60. some other action (type on the keyboard, move the mouse, utilize the
  61. disks) during the prime generation; this gives the random number
  62. generator a better chance to gain enough entropy.
  63. ..........+++++
  64. .+++++
  65. We need to generate a lot of random bytes. It is a good idea to perform
  66. some other action (type on the keyboard, move the mouse, utilize the
  67. disks) during the prime generation; this gives the random number
  68. generator a better chance to gain enough entropy.
  69. ....+++++
  70. ...+++++
  71. gpg: key C5322B0D marked as ultimately trusted
  72. public and secret key created and signed.
  73.  
  74. gpg: checking the trustdb
  75. gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
  76. gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
  77. pub 4096R/C5322B0D 2018-03-27
  78. Key fingerprint = E2B8 7C6C A01C A8A5 51B5 1EA2 08A2 4F42 C532 2B0D
  79. uid Peerapong Samarnpong <peerapong_sam@hotmail.com>
  80. sub 4096R/96C45A7B 2018-03-27
  81. ```
  82.  
  83.  
  84. ```bash
  85. $ gpg --list-secret-key --keyid-format LONG peerapong_sam@hotmail.com
  86. ```
  87.  
  88. ```bash
  89. sec 4096R/08A24F42C5322B0D 2018-03-27
  90. uid Peerapong Samarnpong <peerapong_sam@hotmail.com>
  91. ssb 4096R/2F407CAA96C45A7B 2018-03-27
  92. ```
  93.  
  94. ```bash
  95. $ gpg --armor --export 08A24F42C5322B0D | clip
  96. ```
  97.  
  98.  
  99. ## Generating GPG Key
  100.  
  101. ```bash
  102. $ ssh-keygen -t rsa -C "peerapong_sam@hotmail.com" -b 4096
  103. ```
  104.  
  105. ```bash
  106. $ cat ~/.ssh/id_rsa.pub | clip
  107. ```
Add Comment
Please, Sign In to add comment