Package org.eclipse.jgit.transport.sshd
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)
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The possible values for the "StrictHostKeyChecking" ssh config. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the list of file names from the "GlobalKnownHostsFile" ssh config.boolean
Obtains the value of the "HashKnownHosts" ssh config.Obtains the value of the "StrictHostKeyChecking" ssh config.Retrieves the list of file names from the "UserKnownHostsFile" ssh config.Obtains the user name used in the connection attempt.
-
Method Details
-
getUserKnownHostsFiles
Retrieves the list of file names from the "UserKnownHostsFile" ssh config.- Returns:
- the list as configured, with ~ already replaced
-
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. -
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
Obtains the user name used in the connection attempt.- Returns:
- the user name
-