ssh-import-id(1)
β¨ NAME β¨
okay so ssh-import-id π is the tool that lets you grab one or more public keys from a public keyserver and slide them right into the current user's authorized_keys file (or some other file you pick) ππ«Ά
π SYNOPSIS π
ssh-import-id [options] USER_ID_1 [gh:USER_ID_2] ... [lp:USER_ID_n]
ssh-import-id-lp USER_ID_1 [USER_ID_2] ... [USER_ID_n]
ssh-import-id-gh USER_ID_1 [USER_ID_2] ... [USER_ID_n]
π OPTIONS π
-h,--helpβ shows the usage info, bestie π-o,--output Fβ writes the output to fileFinstead (default is~/.ssh/authorized_keys, and you can use"-"to send it to standard out) πΈ-r,--removeβ removes keys from the authorized keys fileFπ₯-u,--useragent Uβ tacksUonto the end of the user agent string β¨PROTO:USER_IDβ the protocol can belpfor Launchpad.net, orghfor Github.com π¦
π DESCRIPTION π
okay so this utility is seriously so secure π It contacts a public keyserver and retrieves one or more users' public keys, then appends them to the current user's ~/.ssh/authorized_keys file, standard output, or any other output file you want π
User IDs can be prepended by a protocol:
lp:to usehttps://launchpad.net/~%s/+sshkeysgh:to usehttps://api.github.com/users/%s/keys
If the protocol is not explicitly specified, ssh-import-id will read a URL variable string from /etc/ssh/ssh_import_id, as installed by your package manager and configured by your system administrator. You can override this locally by exporting the string you want in a URL environment variable. If all of these are empty, then the protocol is assumed to be "lp:", which was the original target implementation of this tool π§
Any keys added will be "labled" with a trailing comment, # ssh-import-id PROTO:USER_ID. Revoking keys will first look for lines in the authorized keys file ending with that label π·οΈ
π¦ SEE ALSO π¦
π FILES π
/etc/ssh/ssh_import_id
π AUTHOR π
This manpage and the utility was written by Dustin Kirkland <dustin.kirkland@gmail.com> for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
bestie, that's the whole tea on ssh-import-id(1) from ssh-import, last updated 4 Feb 2013 π«Άπ β¨
π¦ where this page comes from
- alpine 3.24: ssh-import-id-doc 5.11-r5 Β· GPL-3.0-only
- debian bookworm: ssh-import-id 5.10-1 Β· GPL-3.0-only
- debian trixie: ssh-import-id 5.10-3 Β· GPL-3.0-only
- nixos 26.05: ssh-import-id 5.11
- nixpkgs unstable: ssh-import-id 5.11
- ubuntu jammy: ssh-import-id 5.11-0ubuntu1 Β· GPL-3.0-only
- ubuntu noble: ssh-import-id 5.11-0ubuntu2 Β· GPL-3.0-only
- ubuntu noble: ssh-import-id 5.11-0ubuntu2.24.04.1 Β· GPL-3.0-only
- ubuntu questing: ssh-import-id 5.11-0ubuntu3 Β· GPL-3.0-only
- ubuntu resolute: ssh-import-id 5.11-0ubuntu4 Β· GPL-3.0-only
- ubuntu stonking: ssh-import-id 5.11-0ubuntu4 Β· GPL-3.0-only
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms