Interface ServerKeyDatabase.Configuration

All Known Implementing Classes:
JGitServerKeyVerifier.SessionConfig
Enclosing interface:
ServerKeyDatabase

public static interface ServerKeyDatabase.Configuration
A simple provider for ssh config settings related to host key checking. An instance is created by the JGit sshd framework and passed into ServerKeyDatabase.lookup(String, InetSocketAddress, Configuration) and ServerKeyDatabase.accept(String, InetSocketAddress, PublicKey, Configuration, CredentialsProvider).
  • Method Details

    • getUserKnownHostsFiles

      List<String> getUserKnownHostsFiles()
      Retrieves the list of file names from the "UserKnownHostsFile" ssh config.
      Returns:
      the list as configured, with ~ already replaced
    • getGlobalKnownHostsFiles

      List<String> getGlobalKnownHostsFiles()
      Retrieves the list of file names from the "GlobalKnownHostsFile" ssh config.
      Returns:
      the list as configured, with ~ already replaced
    • getStrictHostKeyChecking

      Obtains the value of the "StrictHostKeyChecking" ssh config.
      Returns:
      the ServerKeyDatabase.Configuration.StrictHostKeyChecking
    • getHashKnownHosts

      boolean getHashKnownHosts()
      Obtains the value of the "HashKnownHosts" ssh config.
      Returns:
      true if new entries should be stored with hashed host information, false otherwise
    • getUsername

      @NonNull String getUsername()
      Obtains the user name used in the connection attempt.
      Returns:
      the user name