webi-installers icon indicating copy to clipboard operation
webi-installers copied to clipboard

Wanted: ssh-authorize

Open coolaj86 opened this issue 4 years ago • 3 comments

Step 1

Create and publish a cross-platform command to add a key to ~/.ssh/authorized_keys, and set the permissions properly if they are incorrect.

ssh-authorize single-key.pub
# add multiple keys
ssh-authorize https://coolaj86.com/authorized_keys

Bonus: check that the keys aren't already added.

This would be a great project to write in Rust - especially if it doesn't require the extra visual studio runtime libraries - or otherwise Go.

I suppose separate commands in Powershell and Bash could suffice too, if need be.

Step 2

Make a PR to add the installer to Webi, using https://github.com/webinstall/webi-installers/tree/main/keypairs or https://github.com/webinstall/webi-installers/tree/main/ssh-pubkey as a template.

coolaj86 avatar Jul 23 '21 20:07 coolaj86

Is this helpful? https://man.openbsd.org/ssh-keyscan.1

ryanburnette avatar Jul 24 '21 01:07 ryanburnette

Something like ...

ssh-authorize https://ryanburnette.com/pubkey

... would be cool.

ryanburnette avatar Jul 24 '21 01:07 ryanburnette

Is this helpful? https://man.openbsd.org/ssh-keyscan.1

No. That gets the keys of the servers you want to connect to, not the ones you want to connect from.

coolaj86 avatar Jul 24 '21 03:07 coolaj86

@ryanburnette How's that 1Password thing work again?

coolaj86 avatar Jun 01 '23 06:06 coolaj86

https://developer.1password.com/docs/ssh/agent/

ryanburnette avatar Jun 01 '23 12:06 ryanburnette