Ensure that the call to Net::SSH.start only uses the key provided in the manifest, by feeding it the keys_only: true parameter. #799
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into a little-known issue when trying to deploy a MicroBOSH. After deploying to my OpenStack, the bosh micro plugin was trying to ssh into my new instance, but was unsuccessful. The stemcell used was bosh-stemcell-2889-openstack-kvm-ubuntu-trusty-go_agent, deploying to Openstack Havana.
The problem turned out to be that I have more than 5 keys in my ~/.ssh directory. The instance in question only allowed 5 attempts before refusing the ssh connection. The way Ruby's Net::SSH.start works, is it tries the keys in your ~/.ssh directory AND the keys you provide as a parameter to it. So, what was happening is 5 of my own keys were used first in trying to connect. When they failed, the key in the manifest was never actually tried. Next attempt would start... and the cycle would continue.
To limit Net::SSH.start to just using the key provided as a parameter (i.e.: the key provided in the MicroBOSH manifest) is to add the following parameter:
keys_only: true
This solved my issue.