class Object

Constants

SSH2_AGENT_LOCK
SSH2_AGENT_UNLOCK

Public Instance Methods

lock(password) click to toggle source

lock the ssh agent with password

# File lib/vagrant/patches/net-ssh.rb, line 14
def lock(password)
  type, = send_and_wait(SSH2_AGENT_LOCK, :string, password)
  raise AgentError, "could not lock agent" if type != SSH_AGENT_SUCCESS
end
matching?(key_ssh_type, host_key_alg) click to toggle source
# File lib/vagrant/patches/net-ssh.rb, line 55
def matching?(key_ssh_type, host_key_alg)
  return true if key_ssh_type == host_key_alg
  return true if key_ssh_type == 'ssh-rsa' && ['rsa-sha2-512', 'rsa-sha2-256'].include?(host_key_alg)
end
ssh_do_verify(sig, data, options = {}) click to toggle source
# File lib/vagrant/patches/net-ssh.rb, line 29
def ssh_do_verify(sig, data, options = {})
  key.ssh_do_verify(sig, data, options)
end
unlock(password) click to toggle source

unlock the ssh agent with password

# File lib/vagrant/patches/net-ssh.rb, line 20
def unlock(password)
  type, = send_and_wait(SSH2_AGENT_UNLOCK, :string, password)
  raise AgentError, "could not unlock agent" if type != SSH_AGENT_SUCCESS
end