Advertisement
Nelka

Linux tips and tricks

Nov 26th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.04 KB | None | 0 0
  1. # this is the first scratch of the file... It will be edited later. I just statr using linux daily
  2. # on laptop. check later for new commands or tips
  3.  
  4. # generate 100MB lenght file with random content
  5. dd if=/dev/urandom of=~/random_data.bin bs=1024 count=$[1024*100]
  6.  
  7. # export public key in gpg to external file
  8. # You must entry unique identifier of generated key. It can be for exampe email
  9. # Best choice how to read ID is use "gpg --list-keys". Unique indetifier can be
  10. # after key type.
  11.  
  12. #Example
  13. gpg --list-keys
  14. # Output
  15.  
  16. #pub   rsa4096/EC7C1AB7 2014-11-26 [expires: 2016-11-25]
  17. #uid       Real Name (Description) <Email>
  18. #sub   rsa4096/4E2E722F 2014-11-26 [expires: 2016-11-25]
  19.  
  20. # In this case, unique identifier for public part is EC7C1AB7 and 4E2E722F for private part
  21. # So you can export the key
  22.  
  23. gpg --export EC7C1AB7 > ~/unique_identifier.pub
  24.  
  25. # for export public key and
  26.  
  27. gpg --export-secret-key -a 4E2E722F > ~/arcticfox@post.cz.pub
  28.  
  29. # for export private part. You will be asked for passphrase if you want export private part
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement