Class Chef::Knife::Ssh
In: lib/chef/knife/ssh.rb
Parent: Knife

Methods

Attributes

password  [W] 

Public Instance methods

:nodoc: TODO: remove this stuff entirely and package knife ssh as a knife plugin. (Dan - 08 Jul 2010)

The correct way to specify version deps is in the gemspec or other packaging. However, we don‘t want to have a gem dep on net-ssh, because it‘s a hassle when you only need the chef-client (e.g., on a managed node). So we have to check here that you have a decent version of Net::SSH.

net-ssh of lower versions has a bug that causes ‘knife ssh (searchterm) (commandname)" to loop infinitely and consume all the CPU of one core.

Present the prompt and read a single line from the console. It also detects ^D and returns "exit" in that case. Adds the input to the history, unless the input is empty. Loops repeatedly until a non-empty line is input.

[Validate]