com.maverick.sshd
Class AuthorizedKeysStoreImpl

java.lang.Object
  extended bycom.maverick.sshd.AuthorizedKeysStoreImpl
All Implemented Interfaces:
PublicKeyStore

public class AuthorizedKeysStoreImpl
extends java.lang.Object
implements PublicKeyStore

This class implements the OpenSSH style authorized_keys public key store.

Author:
Lee David Painter

Field Summary
protected  java.lang.String authorizedKeysFile
          The path relative to the users home directory from which to load authorized keys
 
Constructor Summary
AuthorizedKeysStoreImpl()
          Create a default authorized_keys store that reads keys from .ssh/authorized_keys.
AuthorizedKeysStoreImpl(java.lang.String authorizedKeysFile)
          Create an authorized keys stores that reads keys from a custom location.
 
Method Summary
 boolean isAuthorizedKey(SshPublicKey key, byte[] sessionid, java.net.SocketAddress remoteAddress, AuthenticationProvider authenticationProvider)
          Checks the given public key by comparing it against the public keys stored in the users authorized_keys file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authorizedKeysFile

protected java.lang.String authorizedKeysFile
The path relative to the users home directory from which to load authorized keys

Constructor Detail

AuthorizedKeysStoreImpl

public AuthorizedKeysStoreImpl()
Create a default authorized_keys store that reads keys from .ssh/authorized_keys.


AuthorizedKeysStoreImpl

public AuthorizedKeysStoreImpl(java.lang.String authorizedKeysFile)
Create an authorized keys stores that reads keys from a custom location.

Parameters:
authorizedKeysFile - String
Method Detail

isAuthorizedKey

public boolean isAuthorizedKey(SshPublicKey key,
                               byte[] sessionid,
                               java.net.SocketAddress remoteAddress,
                               AuthenticationProvider authenticationProvider)
Checks the given public key by comparing it against the public keys stored in the users authorized_keys file.

Specified by:
isAuthorizedKey in interface PublicKeyStore
Parameters:
key - SshPublicKey
sessionid - byte[]
authenticationProvider - AuthenticationProvider
Returns:
boolean


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.