sprinkle-tool / sprinkle

Sprinkle is a software provisioning tool you can use to build remote servers with. eg. to install a Rails, or Sinatra stack on a brand new slice directly after its been created
https://github.com/sprinkle-tool/sprinkle
MIT License
1.15k stars 138 forks source link

Require net-ssh lower than 2.8.0 #189

Closed sosedoff closed 10 years ago

sosedoff commented 10 years ago

Sprinkle SSH authentication does not work with net-ssh gem >= 2.8. It simply fails even if the credentials are correct and were working before the upgrade.

To reproduce the issue, specify version in Gemfile:

gem "net-ssh", "~> 2.8"
gem "sprinkle"

Define capistrano deployment:

deployment do
  delivery :capistrano do
    set :user,  "user"
    set :password, "password"
    role :app,  "localhost"
  end

Requiring net-ssh < 2.8 fixed the issue.

joshgoebel commented 10 years ago

@sosedoff Need more information. Must be something about your setup. I just tried 2.8 and had no issues with either username/password or login via SSH keys.

joshgoebel commented 10 years ago

Oh wait, you're using the cap actor not ssh actor... let me try again.

joshgoebel commented 10 years ago

@sosedoff

Try adding set :ssh_options, { :config => false } and see if that helps with 2.8.

sosedoff commented 10 years ago

@yyyc514 yeah, that did the trick. works now.

Still, its an unexpected behavior..

joshgoebel commented 10 years ago

It doesn't work for me on either 2.7 or 2.8. Capistrano 2.15.5 tries to pull in local ssh options and that mucks with :auth_methods and when auth_methods is mucked with the rescue block is disabled but password also is NOT passed on the first connection attempt - so it will always fails.

My guess is very few Sprinkle users use Capistrano that are using actual passwords vs SSH keys. I just can't see how this would have worked on 2.7 even.

sosedoff commented 10 years ago

Alright then, closing. Thanks!

joshgoebel commented 10 years ago

I don't think we should close, I can see the issue - just wish I had additional reports. Not sure where to fix it without potentially breaking other users setups.

joshgoebel commented 10 years ago

Since no one else has commented I'm going to re-close this.