chef

https://github.com/opscode/chef

Ruby

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

Chef::Knife::Ssh#configure_password

This is a bit overly complicated because of the way we want knife ssh to work with -P causing a password prompt for
the user, but we have to be conscious that this code gets included in knife bootstrap and knife * server create as
well.  We want to change the semantics so that the default is false and 'nil' means -P without an argument on the
command line.  But the other utilities expect nil to be the default and we can't prompt in that case. So we effectively
use ssh_password_ng to determine if we're coming from knife ssh or from the other utilities.  The other utilties can
also be patched to use ssh_password_ng easily as long they follow the convention that the default is false.

Source | Google | Stack overflow

Edit

git clone [email protected]:opscode/chef.git

cd chef

open knife/lib/chef/knife/ssh.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--Knife--Ssh-configure_password-for-pr


# Commit to git

git add knife/lib/chef/knife/ssh.rbgit commit -m "better docs for Chef::Knife::Ssh#configure_password"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Chef--Knife--Ssh-configure_password-for-pr

hub pull-request


# Celebrate!