juju add-ssh-keys -> Error/Fail #5187

Closed
jamesbeedy opened this Issue Apr 15, 2016 · 3 comments

Comments

Projects
None yet
3 participants

Trying to add and import ssh keys fails with juju2.

juju add-ssh-keys `cat id_rsa.pub`

errors with 'cannot add key "ssh-rsa": invalid ssh key: ssh-rsa'

juju import-ssh-keys `cat id_rsa.pub`

succeeds, but doesn't actually add the key :-(

juju version: 2.0-beta4-wily-amd64

machine0.log -> http://paste.ubuntu.com/15856207/

Alongside this, can we get some clear documentation on the difference between 'add-ssh-keys' and 'import-ssh-keys' ?
thx

Contributor

reedobrien commented Apr 16, 2016

Try juju add-ssh-key "$(cat id_rsa.pub)" or

key=`cat id_rsa.pub`
juju add-ssh-key "$key"

import-ssh-key imports a key from launchpad or github.
juju import-ssh-key gh:username will import the public key for, "username". Alternatively, use lp:username to import from launchpad.

A bunch of help text updates were committed this week and are imminent.

Member

anastasiamac commented Aug 19, 2016

Our documentation is at https://jujucharms.com/docs
To file an issue or a bug against documentation, please visit https://github.com/juju/docs/issues/
To file an issue or a bug against juju, please visit https://bugs.launchpad.net/juju-core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment