Created
September 3, 2013 21:01
-
-
Save thansmann/6429523 to your computer and use it in GitHub Desktop.
Bosh ssh bash helper: 'bosh_ssh'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | |
} |
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
There is also a
--gateway_identity_file
if your identity file isn't in ssh-agent