Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature Request: Please set three new environment variables for hammer bosh command. #9

@Houlistonm

Description

@Houlistonm

We are experiencing an issue with the bosh-cli (cloudfoundry/bosh-cli#328) during the following command

hammer bosh -- -d cf-c965095e0afd2591daab ssh clock_global/52145b71-4b6a-44ba-8d46-d4361328f085

ssh returns

Running SSH:
  1 error occurred:
        * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/home/ec2-user/.bosh/tmp/ssh-priv-key750669365 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/home/ec2-user/.bosh/tmp/ssh-known-hosts168026640 -o ProxyCommand=nc -x 127.0.0.1:39601 %!h(MISSING) %!p(MISSING) 10.2.32.10 -l bosh_7542b2ed9bb54c8', stdout: '', stderr: '': exit status 255

Our work around is to set three new environment variables:

eval "$(hammer bosh)"
echo "export BOSH_GW_HOST=$( grep -Po '(?<=@)([^:]+)(?=:)' <<< $BOSH_ALL_PROXY )"
echo "export BOSH_GW_USER=$( grep -Po '(?<=://)([^@]+)(?=@)' <<< $BOSH_ALL_PROXY )"
echo "export BOSH_GW_PRIVATE_KEY=$( grep -Po '(?<=key=)(.*)' <<< $BOSH_ALL_PROXY )"

and then succesfully ssh to a vm with the following command.

hammer bosh -- -d cf-c965095e0afd2591daab ssh clock_global/52145b71-4b6a-44ba-8d46-d4361328f085 --gw-socks5=

The feature request is for the 'hammer bosh ...' command to set and/or output those three env variables depending on the command invocation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions