4 ms·
Or... ssh bob@example.com 'cat >> .ssh/authorized-keys' < ~/.ssh/id_rsa.pub
by lftl 16y ago
Or...
ssh bob@example.com 'cat >> .ssh/authorized-keys' < ~/.ssh/id_rsa.pub
- davidu 16y agoThis is not an idempotent operation, and I would not recommend this for anything besides a one-off event.
- lftl 16y agoInteresting, I hadn't thought about it since, for my usage, setting up keys is pretty much always a one-off event (and pretty rare on top of that). What are the consequences of dropping your key into authorized_keys files multiple times? Tried it out on a Debian box, and didn't see any issues other than the obvious clutter.
- davidu 16y ago"looks bad" :-) But it's a bad habit to get into. Or better yet, it's better to think in idempotent operations when doing systems work.