SSH key removal requires exact name matching
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
EDIT: It seems that ssh key removal requires an explicitly matched name, including comment, spacing, etc. This seems tedious and difficult. Might we be able to make this more friendly?
Original Text:
I can't seem to remove a github ssh key by name
Given the imported key looks like this:
juju ssh-keys
f1:e4:......:64 (blah@github/13545 # ssh-import-id gh:blah)
None of these work:
juju remove-ssh-key blah@github
juju remove-ssh-key blah@github/12345
juju remove-ssh-key gh:blah
---
$ juju import-ssh-key gh:jujubot
$ juju ssh-keys
Keys used in model: admin@local/default
37:de:0f:
47:2d:88:
$ juju remove-ssh-key
error: no ssh key id specified
$ juju remove-ssh-key jujubot@
cannot remove key id "jujubot@
$ juju remove-ssh-key jujubot@github
cannot remove key id "jujubot@github": invalid ssh key: jujubot@github
$ juju remove-ssh-key gh:jujubot
cannot remove key id "gh:jujubot": invalid ssh key: gh:jujubot
$ juju remove-ssh-key jujubot@
cannot remove key id "jujubot@
$ juju remove-ssh-key 47:2d:88:
$ juju ssh-keys
Keys used in model: admin@local/default
37:de:0f:
Did you try:
$ juju remove-ssh-key "blah@github/13545 # ssh-import-id gh:blah"