gnupg_keyring_aktualisieren

Corhandenen Keyring prüfen und alten key löschen
appadm@app1-server:~/.gnupg $ /app/tools/gnupg/gpg –list-secret-keys
/home/appadm/.gnupg/secring.gpg
——————————–
sec  1024R/BDAB866D 2005-08-19 app Admin PCD < app-admin.pcd@dfsdfsdf.com>
ssb  1024R/6881BB38 2005-08-19

appadm@app1-server:~/.gnupg $ /app/tools/gnupg/gpg –delete-secret-keys 6881BB38

sec  1024R/BDAB866D 2005-08-19   app Admin-PCD < app-Admin.PDC@company.com>
Delete this key from the keyring? y
This is a secret key! – really delete? y


appadm@app1-server:~/.gnupg $ /app/tools/gnupg/gpg –delete-keys 6881BB38

pub  1024R/BDAB866D 2005-08-19   app Admin-PCD < app-Admin.PDC@company.com>
Delete this key from the keyring? y

neuen Key einspielen

appadm@app1-server:~/.gnupg $ /app/tools/gnupg/gpg –import /app/tools/gnupg/keys/app-Admin-PCD.asc
gpg: key A897852D: secret key imported
gpg: key A897852D: public key “app-Admin PCD < app-Admin.PCD@company.com>” imported
gpg: Total number processed: 2
gpg:               imported: 1  (RSA: 1)
gpg:       secret keys read: 1
gpg:   secret keys imported: 1

neuen Key prüfen

appadm@app1-server:~/.gnupg $ /app/tools/gnupg/gpg –list-keys
/home/appadm/.gnupg/pubring.gpg
——————————–
pub  1024R/A897852D 2007-08-29 app-Admin PCD < app-Admin.PCD@company.com>
sub  1024R/1AB9BF53 2007-08-29 [expires: 2009-08-28]

verwendete Befehle

gpg –list-secret-keys
gpg –list-keys
gpg –delete-secret-keys ID
gpg –import /app/tools/gnupg/keys/app-Admin-PCD.asc