class Net::SSH::Prompt
end
prompter.sucess if ok
ok = send(user, password)
password = prompter.ask(“password: ”, false)
user = prompter.ask(“user: ”, true)
while !ok && max_retries < 3
prompter = options.start({type:‘password’})
ask and success. Net::SSH uses it like:
object should implemnted a start method, which should return something implementing
A custom prompt objects can implement caching, or different UI. The prompt
you automatically.
It will never be instantiated directly, but will instead be created for
Default prompt implementation, called for asking password from user.
def self.default(options = {})
def self.default(options = {}) @default ||= new(options) end
def initialize(options = {}); end
def initialize(options = {}); end
def start(info)
on the returned object. Info hash tries to uniquely identify the password
start password session. Multiple questions might be asked multiple times
def start(info) Prompter.new(info) end