psanford / wormhole-william

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
MIT License
1.08k stars 55 forks source link

Implement "wormhole ssh invite" #54

Closed hammerandtongs closed 2 years ago

hammerandtongs commented 3 years ago

I'd like the easier deploy for wormhole-william but what I use "magic-wormhole" for is "wormhole ssh invite" and "accept".

This small feature is really great timesaver.

wormhole ssh --help
Usage: wormhole ssh [OPTIONS] COMMAND [ARGS]...

  Facilitate sending/receiving SSH public keys

Options:
  --help  Show this message and exit.

Commands:
  accept  Send your SSH public-key In response to a 'wormhole ssh invite'...
  invite  Add a public-key to a ~/.ssh/authorized_keys file
psanford commented 3 years ago

I'll be honest, I've never really understood why the python magic wormhole client implemented this feature. You're ssh public key is public, its totally fine for you to download it from a publicly available url. In fact, github conveniently exposes your ssh public keys via an unauthenticated api: https://github.com/psanford.keys

Its also pretty easy to do this with just some shell redirects:

# on the sender:
$ cat ~/.ssh/id_ed25519.pub | wormhole-william send --text -
On the other computer, please run: wormhole receive (or wormhole-william recv)
Wormhole code is: 5-amulet-beehive
text message sent

# on the receiver
$ wormhole-william receive 5-amulet-beehive >> ~/.ssh/authorized_keys

Given that, I'm not particularly inclined to add this feature.