# AuthHostbased (sshj 0.4.0 API)
Date: 2011-06-06

## net.schmizz.sshj.userauth.method
Class AuthHostbased

    java.lang.Object
      net.schmizz.sshj.userauth.method.AbstractAuthMethod
          net.schmizz.sshj.userauth.method.KeyedAuthMethod
              net.schmizz.sshj.userauth.method.AuthHostbased

All Implemented Interfaces:
  SSHPacketHandler, AuthMethod

    public class AuthHostbased

extends KeyedAuthMethod

Implements the `hostbased` SSH authentication method.

Field Summary
`protected String` `hostname`
`protected String` `hostuser`

Fields inherited from class net.schmizz.sshj.userauth.method.KeyedAuthMethod
`kProv`

Fields inherited from class net.schmizz.sshj.userauth.method.AbstractAuthMethod
`log, params`

Constructor Summary
`AuthHostbased(KeyProvider kProv, String hostname, String hostuser)`

Method Summary
`protected SSHPacket` `buildReq()` Builds a `SSHPacket` containing the fields common to all authentication method.

Methods inherited from class net.schmizz.sshj.userauth.method.KeyedAuthMethod
`putPubKey, putSig`

Methods inherited from class net.schmizz.sshj.userauth.method.AbstractAuthMethod
`getName, handle, init, makeAccountResource, request, shouldRetry`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### hostname

    protected final String hostname

### hostuser

    protected final String hostuser

Constructor Detail

### AuthHostbased

    public AuthHostbased(KeyProvider kProv,
                         String hostname,
                         String hostuser)

Method Detail

### buildReq

    protected SSHPacket buildReq()
                          throws UserAuthException

  Description copied from class: `AbstractAuthMethod`
  Builds a `SSHPacket` containing the fields common to all authentication method. Method-specific fields can further be put into this buffer.

  Overrides:
    `buildReq` in class `AbstractAuthMethod`
  Throws:
    `UserAuthException`

Copyright © 2009-2011. All Rights Reserved.