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