Class: Net::SSH::Authentication::Methods::None

Inherits:
Abstract
  • Object
show all
Defined in:
lib/audit/lib/ssh_fingerprint2.rb

Instance Method Summary collapse

Instance Method Details

#authenticate(next_service, username = "dummy", password = nil) ⇒ Object



77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/audit/lib/ssh_fingerprint2.rb', line 77

def authenticate(next_service, username = "dummy", password = nil)
	send_message(userauth_request(username, next_service, "none"))
	message = session.next_message
		
	case message.type
		when USERAUTH_SUCCESS
			debug { "login with 'none' suceeded" }
			return true
		when USERAUTH_FAILURE
			debug { "login with 'none' failed" }
			return false
	end
end