1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

現場で使っていたgpgコマンドまとめ

Posted at

概要

メモしてたやつを整理しただけです。

  • gpg鍵のインポート
gpg --import sooota_pub
  • インポートしてある公開鍵を確認
gpg --list-keys
  • インポートしてある秘密鍵を確認
gpg -K
  • インポートしてある公開鍵を削除
gpg --delete-keys メールアドレス
  • 更新など
gpg --edit-key [ID]

gpg> key [NUM] # 操作対象のキー番号を指定; NUMを省略した場合はマスターキーが指定される。 1か2で副鍵が選択される
gpg> expire    # 次のプロンプトで有効期限を指定
gpg> save
gpg> exit #saveで閉じるかも
  • エクスポート
gpg -a -o public.key --export ID
gpg -a -o private.key --export-secret-keys ID
  • 復号化
gpg test.zip.gpg
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?