Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added note about standard ssh options. #7901

Merged
merged 4 commits into from
Oct 3, 2017

Conversation

anastasiamac
Copy link
Contributor

Description of change

Users were not aware that standard 'ssh' options could also be provided to 'juju ssh' command.
Added a paragraph to a command help, similar in wording to 'juju scp'.

QA steps

'juju help ssh' mentions standard ssh options and man.

Documentation changes

n/a

Bug reference

https://bugs.launchpad.net/juju/+bug/1718775

@anastasiamac anastasiamac changed the title Adde note about standard ssh options. Added note about standard ssh options. Oct 3, 2017
Copy link
Member

@jameinel jameinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a little bit more for people to understand this, possibly an example would be sufficient.

@@ -28,6 +28,9 @@ The SSH host keys of the target are verified. The --no-host-key-checks option
can be used to disable these checks. Use of this option is not recommended as
it opens up the possibility of a man-in-the-middle attack.

Options specific to ssh can be provided as well. Refer to the ssh man
page for an explanation of those options.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this isn't quite complete enough, because I don't think you can pass them at arbitrary points on the command line, they have to come after you specify a target. Maybe something like:

Any arguments passed after the target will be passed directly on to OpenSSH (on platforms where it is available).

Along with a later example of:

Pass extra options to SSH:
juju ssh mysql/0 -i SPECIAL_IDENTITY_FILE echo hello

Thoughts?

The main reason is that I don't think:
juju ssh -i IDENTITY_FILE mysql/0
works, because the '-i' is tried to be interpreted by "juju ssh" and not being passed on to ssh.

Copy link
Member

@jameinel jameinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SGTM, but I'd like someone like Peter to give a feel for whether users actually understand this or not.

@anastasiamac
Copy link
Contributor Author

@pmatulis,
Could you please advise if it reads smoother? :D

Copy link

@pmatulis pmatulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you go. 🐙

Options specific to ssh can be provided as well. In fact, any arguments passed
after the target will be passed directly on to OpenSSH
(on platforms where it is available).
Refer to the ssh man page for an explanation of those options.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Options can be passed to the local OpenSSH client (ssh) on platforms where it is available. This is done by inserting them between the target and a possible remote command. Refer to the ssh man page for an explanation of those options.

Won't you be updating the usage on line 76?

Args: "<[user@]target> [openssh options] [command]",

Fix the wordwrapping?

@@ -45,6 +50,12 @@ Connect to a jenkins unit as user jenkins:

juju ssh jenkins@jenkins/0

Pass extra options to SSH:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connect to a mysql unit by passing options to the OpenSSH client. Here, we specify a private key (the default is ~/.ssh/id_rsa):


juju ssh mysql/0 -i SPECIAL_IDENTITY_FILE echo hello

(not 'juju ssh -i SPECIAL_IDENTITY_FILE mysql/0 echo hello')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line?

@@ -45,6 +50,12 @@ Connect to a jenkins unit as user jenkins:

juju ssh jenkins@jenkins/0

Pass extra options to SSH:

juju ssh mysql/0 -i SPECIAL_IDENTITY_FILE echo hello
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

juju ssh mysql/0 -i ~/.ssh/my_private_key echo hello

@anastasiamac
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Oct 3, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 333eb96 into juju:develop Oct 3, 2017
@anastasiamac anastasiamac deleted the ssh-help-lp1718775 branch October 3, 2017 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants