Initial commit. - 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
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2014年05月30日 14:57:57 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2014年05月30日 14:57:57 +0900
commit61a1d4ca6c7b88123e94477ac26209e0075fd143 (patch)
treeaa6f4e6060dfda9555b399e9f753e606ee1ea422 /convert-authkey-ssh.sh
Initial commit.
Diffstat (limited to 'convert-authkey-ssh.sh')
-rwxr-xr-xconvert-authkey-ssh.sh 12
1 files changed, 12 insertions, 0 deletions
diff --git a/convert-authkey-ssh.sh b/convert-authkey-ssh.sh
new file mode 100755
index 0000000..909a98f
--- /dev/null
+++ b/convert-authkey-ssh.sh
@@ -0,0 +1,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日 18:30:25 +0000

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