Auth
====

The (ssh auth) module provides authentication procedures for a Guile-SSH client.

Please note that you must specify a username either on creation of a session or by session-set! call (see Sessions) before calling of procedures from this section.

Also note that the session must be connected before calling to these procedures, otherwise the wrong-type-arg exception will be thrown.

 -- Scheme Procedure: userauth-public-key! session private-key
     Try to authenticate with a public/private key.

     Return one of the following symbols:

     success
          Authentication success.

     partial
          You've been partially authenticated, you still have to use another method.

     denied
          Authentication failed: use another method.

     error
          A serious error happened.

 -- Scheme Procedure: userauth-public-key/auto! session
     Try to automatically authenticate with none method first and then with public keys.  The procedure will try to get a cached private key from a SSH agent and if it fails it will try to read a key from a file.  If the key is encrypted the user will be asked for a passphrase.

     Return one of the following symbols:

     success
          Authentication success.

     partial
          You've been partially authenticated, you still have to use another method.

     denied
          Authentication failed: use another method.

     error
          A serious error happened.

 -- Scheme Procedure: userauth-public-key/try session public-key
     Try to authenticate with the given PUBLIC-KEY.

     To avoid unnecessary processing and user interaction, the following method is provided for querying whether authentication using the PUBLIC-KEY would be possible.

     Return one of the following symbols:

     success
          The public key is accepted, you want now to use userauth-public-key!.

     partial
          You've been partially authenticated, you still have to use another method.

     denied
          Authentication failed: use another method.

     error
          A serious error happened.

 -- Scheme Procedure: userauth-agent! session
     Try to do public key authentication with ssh agent.

     Return one of the following symbols:

     success
          Authentication success.

     partial
          You've been partially authenticated, you still have to use another method.

     denied
          Authentication failed: use another method.

     error
          A serious error happened.

 -- Scheme Procedure: userauth-password! session password
     Try to authenticate by PASSWORD.

     Return one of the following symbols:

     success
          Authentication success.

     partial
          You've been partially authenticated, you still have to use another method.

     denied
          Authentication failed: use another method.

     error
          A serious error happened.

     again
          In nonblocking mode, you've got to call this again later.

 -- Scheme Procedure: userauth-gssapi! session
     Try to authenticate through the gssapi-with-mic method.

     Return one of the following symbols:

     success
          Authentication success.

     partial
          You've been partially authenticated, you still have to use another method.

     again
          In nonblocking mode, you've got to call this again later.

     denied
          Authentication failed: use another method.

     error
          A serious error happened.

 -- Scheme Procedure: userauth-none! session
     Try to authenticate through the none method.

     Return one of the following symbols:

     success
          Authentication success.

     partial
          You've been partially authenticated, you still have to use another method.

     again
          In nonblocking mode, you've got to call this again later.

     denied
          Authentication failed: use another method.

     error
          A serious error happened.

 -- Scheme Procedure: userauth-get-list session
     Get available authentication methods for a SESSION.  Return list of available methods.

     This call will block, even in nonblocking mode, if run for the first time before a (complete) call to userauth-none!.

     Possible methods are: password, public-key, host-based, interactive.