class Net::SSH::KeyFactory

def load_private_key(filename, passphrase=nil, ask_passphrase=true)

prompted to enter their password unless passphrase works.
encrypted (requiring a passphrase to use), the user will be
appropriately. The new key is returned. If the key itself is
whether the file describes an RSA or DSA key, and will load it
Loads a private key from a file. It will correctly determine
def load_private_key(filename, passphrase=nil, ask_passphrase=true)
  data = File.read(File.expand_path(filename))
  load_data_private_key(data, passphrase, ask_passphrase, filename)
end