convert-authkey-ssh.sh - fsij-keyrings.git - FSIJ's GPG keyrings.

FSIJ's GPG keyrings. Git repo user
summary refs log tree commit diff
path: root/convert-authkey-ssh.sh
blob: 909a98f41629e692cfae340860e3183479ef32a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh
exec >authorized_keys
# Show public keys in the keyring, extract public key with A,
# and show its user name and subkey ID.
gpg --no-default-keyring --keyring ./1ドル \
 --list-public-key --with-colons \
| sed -n -e '/A:$/s/^.*:\([^:]*\)::[a-zA-Z]*:$/1円/p' \
 -e '/a:$/s/^.*\(........\):[-0-9]*::::::a:$/1円/p' \
| while read USER_ID; do read SUBKEY_ID; echo $USER_ID>/dev/tty; \
 gpgkey2ssh $SUBKEY_ID | sed -e "s/COMMENT/$USER_ID/"; done
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月16日 15:20:20 +0000

AltStyle によって変換されたページ (->オリジナル) /