Top Description Fields Constructors Methods
org.apache.sshd.server

public Class ServerBuilder

extends BaseBuilder<SshServer, ServerBuilder>
Class Inheritance
Imports
java.util.Arrays, .Collections, .List, java.util.function.Function, org.apache.sshd.common.BaseBuilder, .BuiltinFactory, .NamedFactory, org.apache.sshd.common.channel.ChannelFactory, .RequestHandler, org.apache.sshd.common.cipher.BuiltinCiphers, org.apache.sshd.common.compression.BuiltinCompressions, .Compression, .CompressionFactory, org.apache.sshd.common.global.KeepAliveHandler, org.apache.sshd.common.kex.DHFactory, .KeyExchange, .KeyExchangeFactory, org.apache.sshd.common.kex.extension.DefaultServerKexExtensionHandler, .KexExtensionHandler, org.apache.sshd.common.session.ConnectionService, org.apache.sshd.common.signature.Signature, org.apache.sshd.server.auth.keyboard.DefaultKeyboardInteractiveAuthenticator, .KeyboardInteractiveAuthenticator, org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator, org.apache.sshd.server.channel.ChannelSessionFactory, org.apache.sshd.server.config.keys.DefaultAuthorizedKeysAuthenticator, org.apache.sshd.server.forward.DirectTcpipFactory, org.apache.sshd.server.global.CancelTcpipForwardHandler, .NoMoreSessionsHandler, .OpenSshHostKeysHandler, .TcpipForwardHandler, org.apache.sshd.server.kex.DHGEXServer, .DHGServer

SshServer builder

Field Summary

Modifier and TypeField and Description
public static final List<ChannelFactory>
public static final List<CompressionFactory>
public static final List<RequestHandler<ConnectionService>>
public static final KeyboardInteractiveAuthenticator
public static final KexExtensionHandler
public static final PublickeyAuthenticator
public static final List<BuiltinCiphers>
DEFAULT_SERVER_CIPHERS_PREFERENCE

Default list of ciphers for a server.

public static final Function<DHFactory, KeyExchangeFactory>
protected KeyboardInteractiveAuthenticator
protected PublickeyAuthenticator
Inherited from org.apache.sshd.common.BaseBuilder:
channelFactorieschannelStreamPacketWriterResolvercipherFactoriescompressionFactoriesDEFAULT_CIPHERS_PREFERENCEDEFAULT_FILE_SYSTEM_FACTORYDEFAULT_FORWARDER_FACTORYDEFAULT_FORWARDING_FILTERDEFAULT_KEX_PREFERENCEDEFAULT_MAC_PREFERENCEDEFAULT_SIGNATURE_PREFERENCEDEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLERfactoryfileSystemFactoryforwarderFactoryforwardingFilterglobalRequestHandlerskexExtensionHandlerkeyExchangeFactoriesmacFactoriesrandomFactorysignatureFactoriesunknownChannelReferenceHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public SshServer
build(boolean isFillWithDefaultValues)

Overrides org.apache.sshd.common.BaseBuilder.build.

public static ServerBuilder
protected ServerBuilder
public ServerBuilder
public ServerBuilder
public static List<NamedFactory<Compression>>
setUpDefaultCompressionFactories(boolean ignoreUnsupported)

public static List<KeyExchangeFactory>

Returns:

A List of the default NamedFactory instances of the KeyExchanges according to the preference order defined by DEFAULT_KEX_PREFERENCE

Note

the list may be filtered to exclude unsupported JCE key exchanges according to the ignoreUnsupported parameter

setUpDefaultKeyExchanges
(boolean
If true then all the default key exchanges are included, regardless of whether they are currently supported by the JCE. Otherwise, only the supported ones out of the list are included
ignoreUnsupported
)

public static List<NamedFactory<Signature>>
setUpDefaultSignatureFactories(boolean ignoreUnsupported)

Inherited from org.apache.sshd.common.BaseBuilder:
buildchannelFactorieschannelStreamPacketWriterResolvercipherFactoriescompressionFactoriesfactoryfileSystemFactoryforwarderFactoryforwardingFilterglobalRequestHandlerskexExtensionHandlerkeyExchangeFactoriesmacFactoriesmerandomFactorysetUpDefaultCipherssetUpDefaultMacssignatureFactoriesunknownChannelReferenceHandler

Field Detail

DEFAULT_CHANNEL_FACTORIESback to summary
public static final List<ChannelFactory> DEFAULT_CHANNEL_FACTORIES
DEFAULT_COMPRESSION_FACTORIESback to summary
public static final List<CompressionFactory> DEFAULT_COMPRESSION_FACTORIES
DEFAULT_GLOBAL_REQUEST_HANDLERSback to summary
public static final List<RequestHandler<ConnectionService>> DEFAULT_GLOBAL_REQUEST_HANDLERS
DEFAULT_INTERACTIVE_AUTHENTICATORback to summary
public static final KeyboardInteractiveAuthenticator DEFAULT_INTERACTIVE_AUTHENTICATOR
DEFAULT_KEX_EXTENSION_HANDLERback to summary
public static final KexExtensionHandler DEFAULT_KEX_EXTENSION_HANDLER
DEFAULT_PUBLIC_KEY_AUTHENTICATORback to summary
public static final PublickeyAuthenticator DEFAULT_PUBLIC_KEY_AUTHENTICATOR
DEFAULT_SERVER_CIPHERS_PREFERENCEback to summary
public static final List<BuiltinCiphers> DEFAULT_SERVER_CIPHERS_PREFERENCE

Default list of ciphers for a server. This excludes the AES-CBC ciphers -- OpenSSH has stopped proposing them by default in 2014 (and removed them from the client proposal in 2017, too). CBC is susceptible to padding oracle attacks and other attacks and is thus not recommended anymore.

For clients, we do still include the CBC modes to better support connecting with legacy servers.

DH2KEXback to summary
public static final Function<DHFactory, KeyExchangeFactory> DH2KEX
Annotations
@SuppressWarnings:checkstyle:Indentation
interactiveAuthenticatorback to summary
protected KeyboardInteractiveAuthenticator interactiveAuthenticator
pubkeyAuthenticatorback to summary
protected PublickeyAuthenticator pubkeyAuthenticator

Constructor Detail

ServerBuilderback to summary
public ServerBuilder()

Method Detail

buildback to summary
public SshServer build(boolean isFillWithDefaultValues)

Overrides org.apache.sshd.common.BaseBuilder.build.

Annotations
@Override
builderback to summary
public static ServerBuilder builder()
fillWithDefaultValuesback to summary
protected ServerBuilder fillWithDefaultValues()

Overrides org.apache.sshd.common.BaseBuilder.fillWithDefaultValues.

Annotations
@Override
interactiveAuthenticatorback to summary
public ServerBuilder interactiveAuthenticator(KeyboardInteractiveAuthenticator auth)
publickeyAuthenticatorback to summary
public ServerBuilder publickeyAuthenticator(PublickeyAuthenticator auth)
setUpDefaultCompressionFactoriesback to summary
public static List<NamedFactory<Compression>> setUpDefaultCompressionFactories(boolean ignoreUnsupported)
Annotations
@SuppressWarnings:unchecked, rawtypes
setUpDefaultKeyExchangesback to summary
public static List<KeyExchangeFactory> setUpDefaultKeyExchanges(boolean ignoreUnsupported)
Parameters
ignoreUnsupported:boolean

If true then all the default key exchanges are included, regardless of whether they are currently supported by the JCE. Otherwise, only the supported ones out of the list are included

Returns:List<KeyExchangeFactory>

A List of the default NamedFactory instances of the KeyExchanges according to the preference order defined by DEFAULT_KEX_PREFERENCE

Note

the list may be filtered to exclude unsupported JCE key exchanges according to the ignoreUnsupported parameter

See Also
org.apache.sshd.common.kex.BuiltinDHFactories#isSupported()
setUpDefaultSignatureFactoriesback to summary
public static List<NamedFactory<Signature>> setUpDefaultSignatureFactories(boolean ignoreUnsupported)
Annotations
@SuppressWarnings:unchecked, rawtypes