[feature request] implement native ssh '-i' option

Bug #1718775 reported by Peter Matulis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Anastasia

Bug Description

Currently (2.3), in order for a non-controller-admin Juju user to connect to a machine via SSH the person must either:

 - rename their private key (corresponding to the public one added with `juju add-ssh-key`) to `id_rsa`
 - add their private key to ssh-agent (`ssh-add`). Note that if ssh-agent is not running then starting it is not obvious to many

This can all be done away with if Juju implemented the expected behaviour: to be able to specify a key like you can with the native SSH client:

`juju ssh -i ~/.ssh/mykey-id_rsa <machine #>`

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1718775] [NEW] [feature request] implement native ssh '-i' option

I believe we pass all options on to ssh that trail the initial request. So
I *think* that:
juju ssh 0 -i ~/.ssh/mykey

is likely to work as you want.

On Fri, Sep 22, 2017 at 12:32 AM, Peter Matulis <<email address hidden>
> wrote:

> Public bug reported:
>
> Currently (2.3), in order for a non-controller-admin Juju user to
> connect to a machine via SSH the person must either:
>
> - rename their private key (corresponding to the public one added with
> `juju add-ssh-key`) to `id_rsa`
> - add their private key to ssh-agent (`ssh-add`). Note that if ssh-agent
> is not running then starting it is not obvious to many
>
> This can all be done away with if Juju implemented the expected
> behaviour: to be able to specify a key like you can with the native SSH
> client:
>
> `juju ssh -i ~/.ssh/mykey-id_rsa <machine #>`
>
> ** Affects: juju
> Importance: Undecided
> Status: New
>
>
> ** Tags: docteam
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1718775
>
> Title:
> [feature request] implement native ssh '-i' option
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1718775/+subscriptions
>

Revision history for this message
Peter Matulis (petermatulis) wrote :

ZOMG it works.

I can update the Juju user guide but someone else needs to update the CLI help.

$ juju help ssh Usage: juju ssh [options] <[user@]target> [command]

to

Usage: juju ssh [options] <[user@]target> [ssh options] [command]

Changed in juju:
status: New → Incomplete
status: Incomplete → Invalid
status: Invalid → Triaged
importance: Undecided → Medium
tags: added: usability
tags: added: helpdocs
Changed in juju:
status: Triaged → In Progress
assignee: nobody → Anastasia (anastasia-macmood)
Revision history for this message
Anastasia (anastasia-macmood) wrote :

The command line in help is generated.

Nonetheless, I have added a small paragraph mentioning standard ssh option in a similar fashion to how 'juju scp' mentions standard scp options.

PR against develop (2.3): https://github.com/juju/juju/pull/7901

Changed in juju:
milestone: none → 2.3-alpha1
Changed in juju:
status: In Progress → Fix Committed
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.

Other bug subscribers

Remote bug watches

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