CBKADAL
OSP Weekly Assignments
C. BinKadal --- Sendirian, Berhad.


Export Public Key “mypubkey.txt”

List All Keys

gpg --list-key

$ gpg --list-key
/home/cbkadal/.gnupg/pubring.kbx
--------------------------------
pub   rsa4096 2021-09-11 [SC] [expires: 2023-02-07]
      CE17E9DB8AD01794E3BAE98B60914D29C01C81F1
uid           [ultimate] Cicak Bin Kadal (CBK) <cbkadal@localhost>
sub   rsa4096 2021-09-11 [E] [expires: 2023-02-07]

pub   rsa4096 2022-02-07 [SC] [expires: 2023-02-07]
      055FEB594B351CC03DE992C563FB12B215403B20
uid           [  full  ] RMS46 (RMS46) <rms46@ui.ac.id>
sub   rsa4096 2022-02-07 [E] [expires: 2023-02-07]


List Your Own Key Only (e.g. cbkadal@localhost)

  • check if your key is valid
gpg --list-key cbkadal@localhost

$ gpg --list-key cbkadal@localhost
pub   rsa4096 2021-09-11 [SC] [expires: 2023-02-07]
      CE17E9DB8AD01794E3BAE98B60914D29C01C81F1
uid           [ultimate] Cicak Bin Kadal (CBK) <cbkadal@localhost>
sub   rsa4096 2021-09-11 [E] [expires: 2023-02-07]


Export Your Own Key to file “mypubkey.txt”

  • Assuming your local git repo is “$HOME/git/sp241/”
  • Export public key to file “$HOME/git/sp241/mypubkey.txt”
  • But always REMEMBER, you are not “cbkadal”!
cd $HOME/git/sp241/TXT/
rm -f mypubkey.txt
gpg --output mypubkey.txt --armor --export cbkadal@localhost
ls -al

$ cd $HOME/git/sp241/TXT/

$ rm -f mypubkey.txt

$ gpg --output mypubkey.txt --armor --export cbkadal@localhost

$ ls -al
total 16
drwxr-xr-x 2 cbkadal cbkadal 4096 Feb  7 22:50 .
drwxr-xr-x 5 cbkadal cbkadal 4096 Jan 31 15:30 ..
-rw-r--r-- 1 cbkadal cbkadal   32 Jan 31 15:28 mylog.txt
-rw-r--r-- 1 cbkadal cbkadal 3159 Feb  7 22:50 mypubkey.txt




© 2024-2024 --- C. BinKadal --- Revision: 0053---13-Jun-2024.