page counter next up previous contents
Next: 漏洞處理 Up: GnuPG Previous: 簽章驗證   Contents   DYWANG_HOME

移除公鑰

  1. 列出目前的公私鑰,其中有一筆 key id 907CE30E 公鑰。
    [deyu1@kvm8 ~]$ gpg --list-keys
    /root/.gnupg/pubring.gpg
    ------------------------
    pub   2048R/01D10468 2014-06-05
    uid                  abc123 (abc123) <abc123@csie.cyut.edu.tw>
    sub   2048R/192D59C1 2014-06-05
    
    pub   2048R/907CE30E 2013-06-20
    uid                  De-Yu Wang (rhcx) <dywang7@gamil.com>
    sub   2048R/26F7F452 2013-06-20
    
  2. 刪除 key id 907CE30E 公鑰。
    [deyu1@kvm8 ~]$ gpg --delete-keys 907CE30E
    gpg (GnuPG) 2.0.14; Copyright (C) 2009 Free Software Foundation, Inc.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    
    pub  2048R/907CE30E 2013-06-20 De-Yu Wang (rhcx) <dywang7@gamil.com>
    
    Delete this key from the keyring? (y/N) y
    
  3. 再列出目前的公私鑰,key id 907CE30E 公鑰已不見。
    [deyu1@kvm8 ~]$ gpg --list-keys
    /root/.gnupg/pubring.gpg
    ------------------------
    pub   2048R/01D10468 2014-06-05
    uid                  abc123 (abc123) <abc123@csie.cyut.edu.tw>
    sub   2048R/192D59C1 2014-06-05
    


De-Yu Wang 2020-05-19