Class: Net::SSH::UserAuth::Driver

Class | Net::SSH::UserAuth::Driver
In: | lib/net/ssh/userauth/driver.rb
Parent: | Object

A wrapper around the transport layer that represents the functionality of user authentication.

### Methods

authenticate new on_banner send_message set_auth_method_order set_host_key_files set_key_files wait_for_message

### Included Modules

Net::SSH::UserAuth::Constants Net::SSH::Transport::Constants

### Attributes

key_manager | [W] | The UserKeyManager instance used by the auth service.
order | [R] | The array of auth-method names (as strings), giving the order in which each auth-method will be tried.
session | [W] | The SSH (transport) session to use for communication.

### Public Class methods

new( log, buffers, methods, order )

Create a new user-auth service on top of the given session.

### Public Instance methods

authenticate( next_service, username, password=nil )

Processes the authentication of the given username. The ‘next_service’ parameter should be set to the SSH service that will be requested once the authentication succeeds (usually ‘ssh-connection’).

This will return `true` if the user is accepted by the server, and `false` otherwise.

on_banner( &block )

Specify the callback to use when the server sends a banner message at login time.

send_message( message )

Sends the message by delegating to the session‘s send_message method. (This is a convenience method for the authentication implementations.)

set_auth_method_order( *methods )

Changes the set of authentication methods to try to the given array. Methods are tried in the order in which they are listed in the array.

set_host_key_files( files )

Causes the set of on-disk host key files to be used to be set to the given array. Any host key files that were specified previously are lost.

set_key_files( files )

Causes the set of on-disk key files to be used to be set to the given array. Any key files that were specified previously are lost.

wait_for_message()

Wraps the Net::SSH::Transport::Session#wait_for_message method, doing special checking for authentication-related messages.

[Validate]