mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
title, homepage, tagline
| title | homepage | tagline |
|---|---|---|
| SSH Authorize | https://webinstall.dev/ssh-authorize | Add to your SSH Authorized Keys from a string, file, or url. |
Files
These are the files / directories that are created and/or modified with this install:
~/.config/envman/PATH.env
~/.local/bin/ssh-authorize
~/.ssh/authorized_keys
Cheat Sheet
Does the tedious work of making sure your
.ssh/authorized_keysexists with the proper permissions, and that only valid keys from a given string, file, or URL go into it!
Use ssh-authorize to add trusted public keys to allow others to login to your
servers / systems / local computers;
# ssh-authorize <ssh-pubkey-or-file-or-url> [comment]
ssh-authorize https://github.com/jonny.keys 'My GitHub Keys'
USAGE
ssh-authorize <ssh-pubkey-or-file-or-url> [comment]
EXAMPLES
ssh-authorize https://github.com/you.keys 'My GH Keys'
ssh-authorize ./id_rsa.you@example.co.pub
ssh-authorize 'ssh-rsa AAAA...example.co'
LOCAL IDENTIFY FILES
/home/app/.ssh/id_rsa.pub
How to Add Manually
For the simplest case it seems almost silly to even have a utility for this:
mkdir -p ~/.ssh/
chmod 0700 ~/.ssh/
touch ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/
curl https://github.com/me.keys >> ~/.ssh/authorized_keys
but... tedium, error checking... things are never as simple as they seem.
But really, why?
- handles arbitrary files and URLs, failing bad key lines
- sets permissions correctly, even if they were incorrect
- works
curl(macOS, Ubuntu) orwget(Docker, Alpine) - enforces
https