2.1b5: If I have superuser and admin access, juju add-ssh-key doesn't work

Bug #1663035 reported by David Britton
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
John A Meinel
2.1
Fix Released
High
Ian Booth

Bug Description

I have to run my old trick of

juju run --all 'ssh-import-id davidpbritton'

to make juju ssh function.

What I expected:

this to work:

dpb@helo:charms[0]$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0FBS7/4YTbXYe5UBaq+UaBkG83ZRx8FibICH+kCOilZbCReCAfx1r3qSvKzomU6MPxJU1srTZQvGqSzX6AIrEY8Cjk0NqZx1aXKeXUgD0EEDpilgkZGDc/QJmGRI6HBn3MIQPcm42qC133mFdcrAtis2Rgd9Np377j2y+SjA0EAkIjBw9JeUZWG2tbo9t62uh1PRO5/TULKblsOIgLecRilc6ZEHA656YkmOkcK1qF4Yz68awEd0J5b9fpahj/7gh4He5IFVZQXGmstxg+Wgr2bLwpYbQIN9BDSlbeCtlp2b5Xt3PQmuyA4pvyZMskq+09DY53VhCKYF3mMWPryZ1Q== dpb@ahab
dpb@helo:charms[0]$ juju add-ssh-key "$(cat ~/.ssh/id_rsa.pub)"
ERROR permission denied (unauthorized access)
dpb@helo:charms[0]$

(Notice, it didn't)

Current permissions:

dpb@helo:charms[0]$ juju list-users
Controller: atlas-lrc

Name Display name Access Date created Last connection
admin admin superuser 2017-02-07 17 minutes ago
dpb2* superuser 2017-02-07 just now

You have new mail in /home/dpb/Mail/canonical/INBOX
dpb@helo:charms[0]$ juju list-users^C
dpb@helo:charms[0]$ juju models
Controller: atlas-lrc

Model Cloud/Region Status Machines Cores Access Last connection
admin/controller* atlas available 5 2 admin just now
admin/default atlas available 0 - admin never connected

dpb@helo:charms[0]$

Tags: landscape
David Britton (dpb)
tags: added: landscape
Ian Booth (wallyworld)
Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.2.0-alpha1
Revision history for this message
Adam Collard (adam-collard) wrote :

Hmm, why wouldn't you use `juju add-ssh-key`?

Revision history for this message
Adam Collard (adam-collard) wrote :

I am not a smart man. Ignore last comment

Revision history for this message
Anastasia (anastasia-macmood) wrote :

Final fix committed to develop (2.2) as part of the merge https://github.com/juju/juju/pull/6968

Changed in juju:
status: Triaged → Fix Committed
assignee: nobody → John A Meinel (jameinel)
Revision history for this message
Merlijn Sebrechts (merlijn-sebrechts) wrote :

Thanks. Any chance this will be included in 2.1?

Revision history for this message
Anastasia (anastasia-macmood) wrote :

@Merlijn Sebrechts (merlijn-sebrechts),

The fix went into 2.1-rc1. All consecutive 2.1 releases will have it \o/ 2.1-rc2; 2.1.0 (GA); 2.1.1, etc :D

The fix was also forward-ported. All newest series of Juju starting from 2.2 will have it as well.

Revision history for this message
Merlijn Sebrechts (merlijn-sebrechts) wrote :

\o/

Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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