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

Add the env variable PASSHPORT_TARGET #561

Merged

Conversation

phlb
Copy link
Contributor

@phlb phlb commented Mar 16, 2021

This variable allow to define the target without interfere in the remote
command line :

  • it is more flexible for automation tools (no command interference).
    With a syntax like this :

    PASSHPORT_TARGET=myhost ssh -o SendEnv=PASSHPORT_TARGET bastion

  • it is more transparent for user. You can define ssh client config like this :

    Host myhost
    User passhport
    Hostname bastion
    SendEnv PASSHPORT_TARGET
    SetEnv "PASSHPORT_TARGET=myhost"

and just type

ssh myhost <cmd>

or define the bastion like this:

Host bastion
    User passhport
    Hostname bastion
    SendEnv PASSHPORT_TARGET

and use it like this:

PASSHPORT_TARGET=myhost ssh bastion <cmd>

This pull request make passhport easier to be used with an automation tool like ansible ans is related to #547

This variable allow to define the target without interfere in the remote
command line :

- it is more flexible for automation tools (no command interference).
  With a syntax like this :

    PASSHPORT_TARGET=myhost ssh -o SendEnv=PASSHPORT_TARGET bastion <cmd>

- it is more transparent for user. You can define ssh client config like this :

    Host myhost
        User passhport
        Hostname bastion
        SendEnv PASSHPORT_TARGET
        SetEnv "PASSHPORT_TARGET=myhost"

and just type

    ssh myhost <cmd>

or define the bastion like this:

    Host bastion
        User passhport
        Hostname bastion
        SendEnv PASSHPORT_TARGET

and use it like this:

    PASSHPORT_TARGET=myhost ssh bastion <cmd>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants