Last active
April 30, 2017 00:45
-
-
Save daurnimator/96d285dd22a71004f84793c4a9e4530f to your computer and use it in GitHub Desktop.
Idea for sshd AuthorizedKeysCommand to use gpg trust database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gpg --list-trustdb | | |
lua -e 'for line in io.stdin:lines() do | |
local key, level = line:match("^rec%s+%d+, trust (%x+), ot=(%d+)") | |
if key and tonumber(level) == 6 then -- 6 means ultimate trust (and not revoked) | |
print(key) | |
end | |
end' | | |
xargs -n 1 gpg --export-ssh-key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TheNevermind, what I wrote isn't exactly correctlua
call can be done in awk