authenticate (Net::SSH::UserAuth::Methods::Password)

    # File lib/net/ssh/userauth/methods/password.rb, line 41
              def authenticate( next_service, username, data={} )
                return false unless data[:password]

                msg = @buffers.writer
                msg.write_byte USERAUTH_REQUEST
                msg.write_string username
                msg.write_string next_service
                msg.write_string "password"
                msg.write_bool false
                msg.write_string data[:password]
                @messenger.send_message msg

                message = @messenger.wait_for_message

                case message.message_type
                  when USERAUTH_SUCCESS
                    return true
                  when USERAUTH_FAILURE, USERAUTH_PASSWD_CHANGEREQ
                    return false
                  else
                    raise Net::SSH::Exception,
                      "unexpected reply to USERAUTH_REQUEST: #{message.inspect}"
                end
              end