SSH key removal requires exact name matching

Bug #1627128 reported by Nicholas Skaggs
6
This bug affects 1 person
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:ff:58:61:ef:1f:1e:2f:b5:a2:a1:3c:f6:df (nskaggs@balloons)
47:2d:88:82:a6:84:9a:ca:44:3e:54:79:ed:bc:e4:64 (jujubot@github/19178372 # ssh-import-id gh:jujubot)
$ juju remove-ssh-key
error: no ssh key id specified
$ juju remove-ssh-key jujubot@github/19178372
cannot remove key id "jujubot@github/19178372": invalid ssh key: jujubot@github/19178372
$ 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@github/19178372
cannot remove key id "jujubot@github/19178372": invalid ssh key: jujubot@github/19178372
$ juju remove-ssh-key 47:2d:88:82:a6:84:9a:ca:44:3e:54:79:ed:bc:e4:64
$ juju ssh-keys
Keys used in model: admin@local/default
37:de:0f:ff:58:61:ef:1f:1e:2f:b5:a2:a1:3c:f6:df (nskaggs@balloons)

Tags: usability
Revision history for this message
Martin Packman (gz) wrote :

Did you try:

$ juju remove-ssh-key "blah@github/13545 # ssh-import-id gh:blah"

Changed in juju:
status: New → Incomplete
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

This worked as suggested, though I find it a little crazy:

$GOPATH/bin/juju remove-ssh-key 'jujubot@github/19178372 # ssh-import-id gh:jujubot'

Changed in juju:
status: Incomplete → Opinion
summary: - Cannot remove a github ssh key by name
+ SSH key removal requires exact name matching
description: updated
tags: added: usability
Changed in juju:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.