Giter VIP home page Giter VIP logo

Comments (10)

patcon avatar patcon commented on June 1, 2024

Seems like this comes from either net-ssh-multi or net-ssh-gateway not knowing about net-ssh's ability to parse ssh_config files:
https://net-ssh.github.io/ssh/v2/api/classes/Net/SSH/Config.html

from knife-zero.

patcon avatar patcon commented on June 1, 2024

Sample of how knife properly deals with ssh_config by default:
https://github.com/chef/chef/blob/d8172e646d9fbf43e57bca5e20d0ac352ba9a66a/lib/chef/knife/ssh.rb#L213

from knife-zero.

patcon avatar patcon commented on June 1, 2024

Hm. I see that that's done for bootstrap, but I think there's some confusion, as Net::SSH.configuration_for returns a hash with a :user and :port key, and it appears the current code assumes it would be at :ssh_user and :ssh_port

I unfortunately don't have time to sort this out for my current project, but I'll try to come back later and submit a PR :)

from knife-zero.

patcon avatar patcon commented on June 1, 2024

Also, any reason bootstrap and chef_client subcommands couldn't share more ssh config info?

from knife-zero.

sawanoboly avatar sawanoboly commented on June 1, 2024

Thank you for your report, It's a bug.
I want to fix it if possible.

from knife-zero.

sawanoboly avatar sawanoboly commented on June 1, 2024

I see that that's done for bootstrap, but I think there's some confusion, as Net::SSH.configuration_for returns a hash with a :user and :port key, and it appears the current code assumes it would be at :ssh_user and :ssh_port

Ahh.. That makes sense!

from knife-zero.

sawanoboly avatar sawanoboly commented on June 1, 2024

I noticed that I have to change ssh_user 'root' to nil by default. hmm...

from knife-zero.

sawanoboly avatar sawanoboly commented on June 1, 2024

Related(loose) : chef/chef#4038

from knife-zero.

sawanoboly avatar sawanoboly commented on June 1, 2024

@patcon
Maybe this issue will be solved with...

  • knife-zero-1.9.0.pre.1
    • remove default ssh_user.
  • chef 12.5 (not released yet)
    • load ssh config file at Chef::Knife::SSH#session_options

from knife-zero.

sawanoboly avatar sawanoboly commented on June 1, 2024

chef 12.5 and knife-zeto 1.9.0 has released. close for now.

And hand over baton to #48

from knife-zero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.