Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

jrbudnack
Copy link

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.

…the manifest, by feeding it the keys_only: true parameter.
@cfdreddbot
Copy link

Hey jrbudnack!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you've already signed the CLA.

@jrbudnack
Copy link
Author

bump @cppforlife ^^

@cppforlife
Copy link
Contributor

@jrbudnack since we are trying to avoid making more changes to micro CLI plugin since we are pushing people to use bosh-init. Also I'm not sure if some people may depend on this behavior already. Have you tried bosh-init?

@cppforlife
Copy link
Contributor

Closing as per last comment.

@cppforlife cppforlife closed this Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants