bosh-cli: bosh2 ssh fails where bosh1 ssh works (using gateway)

Am I using bosh2 ssh correctly?

Version:

$ bosh2 -v
version 0.0.155-bad46e9-2017-02-01T06:59:24Z

Failing command:

$ bosh2 -e lite46 -d cf ssh brain/xxx --gw-user vcap --gw-host 10.58.111.46 --gw-private-key path/to/sshkeys/bosh-lites.pem
Using environment 'https://10.58.111.46:25555' as client 'admin'

Using deployment 'cf'

Task 22. Done
Warning: Permanently added '10.58.111.46' (ECDSA) to the list of known hosts.
Unauthorized use is strictly prohibited. All access and activity
is subject to logging and monitoring.
Permission denied (publickey,password).
ssh_exchange_identification: Connection closed by remote host

Running SSH:
  1 error(s) occurred:

* Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key217728386 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts928741625 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l vcap 10.58.111.46 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/Projects/bosh_deployments/bosh-lites/sshkeys/bosh-lites.pem 10.244.0.106 -l bosh_4f38b31b526b4090', stdout: '', stderr: '': exit status 255

Exit code 1

The -W %!h(MISSING):%!p(MISSING) looks suspicious.

The same attributes (I think) passed to bosh1 work:

bosh -t vsphere-lite-46 -d cf-46-dpg-integration-test.yml ssh --gateway_host 10.58.111.46 --gateway_user vcap --gateway_identity_file path/to/sshkeys/bosh-lites.pem

Am I using bosh2 incorrectly?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

Ok, removing the --gw-private-key path/to/badkey.pem and it no longer fails. I guess bosh ssh used to politefully ignore the bad key and move on to password.

bosh2 -e lite46 -d cf ssh uaa --gw-user vcap --gw-host 10.58.111.46 --opts=-v

Yay for --opts=-v