Fetch User Keys - simple tool for fetching SSH keys from various sources
1FUK(1) "git.sr.hr/~hauleth/fuk" "General Commands Manual"
2
3# NAME
4
5fuk - Fetch User Keys
6
7# SYNOPSIS
8
9*fuk* -h++
10*fuk* [--format (json|pretty)] _config.toml_
11
12# DESCRIPTION
13
14Tool for fetching public SSH keys from various sources.
15
16# CONFIGURATION
17
18Configuration uses TOML file format. In root it requires _entry_ field which
19must be a list of entries to be present in output. Each entry must have at least
202 keys:
21
22*name*
23 Name of output field.
24
25*keys*
26 List of sources for the keys. See _SOURCES_
27
28# SOURCES
29
30*raw*
31 Takes as a value list of public SSH keys. These keys will be printed in
32 the output as is.
33
34*host*
35 Hostnames that will be passed to _ssh-keyscan_(1).
36
37*http*
38 Takes `url` as and argument, with URL pointing to the HTTP resource that
39 will contain SSH keys.
40
41*github*, *gitlab*, *sourcehut*, *codeberg*
42 Each of these are shortcuts for *http* entries to provide default
43 _url_ for equivalent entries. In order these would be _github.com_,
44 _gitlab.com_, _meta.sr.ht_, and _codeberg.org_.
45
46*tangled*
47 Support for _tangled.sh_ keys stored in the ATProto profile. Accepts
48 either string, which should be either DID or handle (with or without
49 preceding `@` sign), or a structure with `handle` key and optional
50 `host` key. Default host is _https://bsky.social_.
51
52Example configuration:
53
54```
55[[entry]]
56name = "hauleth"
57keys = [
58 { github = "hauleth" },
59 { sourcehut = "~hauleth" }
60]
61
62[[entry]]
63name = "sourcehut"
64keys = [
65 { hosts = [ "git.sr.ht", "hg.sr.ht" ] }
66]
67```
68
69# OUTPUT
70
71_fuk_ prints result to stdout in JSON format. Keys will be deduplicated by
72algorithm and key, but the comment *will* be ignored when comparing for
73equality. If comments for duplicated keys are different, then there is no
74guarantee about comment content.
75
76Example output:
77
78```
79{
80 "hauleth": [
81 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...",
82 ],
83 "sourcehut": [
84 "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNo...",
85 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...",
86 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB...",
87 ]
88}
89```
90
91# AUTHORS
92
93Maintained by Łukasz Niemier <~@hauleth.dev>. Sources can be found at
94https://git.sr.ht/~hauleth/fuk.
95
96# BUGS AND PATCHES
97
98Report bugs and submit patches to public inbox of maintainer at
99<~hauleth/public-inbox@lists.sr.ht>.
100
101; vim: noexpandtab