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*forge* 38 Takes map as an argument, that map must have 2 keys, _user_ which will 39 be the name of the user used for querying and _host_ which will be the 40 host that will be queried. The resulting URL will be constructed as 41 _https://{host}/{user}.keys_. 42 43*github*, *gitlab*, *sourcehut*, *codeberg* 44 Each of these are shortcuts for *forge* entries to provide default 45 _host_ for equivalent entries. In order these would be _github.com_, 46 _gitlab.com_, _meta.sr.ht_, and _codeberg.org_. 47 48Example configuration: 49 50``` 51[[entry]] 52name = "hauleth" 53keys = [ 54 { github = "hauleth" }, 55 { sourcehut = "~hauleth" } 56] 57 58[[entry]] 59name = "sourcehut" 60keys = [ 61 { hosts = [ "git.sr.ht", "hg.sr.ht" ] } 62] 63``` 64 65# OUTPUT 66 67_fuk_ prints result to stdout in JSON format. Keys will be deduplicated by 68algorithm and key, but the comment *will* be ignored when comparing for 69equality. If comments for duplicated keys are different, then there is no 70guarantee about comment content. 71 72Example output: 73 74``` 75{ 76 "hauleth": [ 77 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...", 78 ], 79 "sourcehut": [ 80 "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNo...", 81 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...", 82 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB...", 83 ] 84} 85``` 86 87# AUTHORS 88 89Maintained by Łukasz Niemier <~@hauleth.dev>. Sources can be found at 90https://git.sr.ht/~hauleth/fuk. 91 92# BUGS AND PATCHES 93 94Report bugs and submit patches to public inbox of maintainer at 95<~hauleth/public-inbox@lists.sr.ht>. 96 97; vim: noexpandtab