class Net::SSH::Prompt::Prompter

might implement caching.
default prompt object implementation. More sophisticated implemenetations

def ask(prompt, echo = true)

(like user and password) in a single session.
ask input from user, a prompter might ask for multiple inputs
def ask(prompt, echo = true)
  $stdout.print(prompt)
  $stdout.flush
  ret = $stdin.noecho(&:gets).chomp
  $stdout.print("\n")
  ret
end

def initialize(info)

def initialize(info)
  if info[:type] == 'keyboard-interactive'
    $stdout.puts(info[:name]) unless info[:name].empty?
    $stdout.puts(info[:instruction]) unless info[:instruction].empty?
  end
end

def success; end

It's a good time to save password asked to a cache.
success method will be called when the password was accepted
def success; end