Skip to content

Instantly share code, notes, and snippets.

@thansmann
Created September 3, 2013 21:01
Show Gist options
  • Save thansmann/6429523 to your computer and use it in GitHub Desktop.
Save thansmann/6429523 to your computer and use it in GitHub Desktop.
Bosh ssh bash helper: 'bosh_ssh'
function bosh_ssh () {
# confirm vcap@director ssh-key is in ssh-agent or are the default ~/id_[rd]sa
DIRECTOR_ADDRESS=`director_address`;
echo "bosh ssh $* --gateway_host $DIRECTOR_ADDRESS --gateway_user vcap"
bosh ssh $* --gateway_host $DIRECTOR_ADDRESS --gateway_user vcap
}
function director_address () {
bosh -n target | ruby -ne 'a = $_.split("//").last.split(":").first; puts a';
}
@drnic
Copy link

drnic commented Sep 3, 2013

There is also a --gateway_identity_file if your identity file isn't in ssh-agent

@cxhercules
Copy link

Thank you both I had to use it like this:

bosh_ssh web 0 --gateway_identity_file bosh.key --strict_host_key_checking no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment