Package com.google.gerrit.sshd
Class SshDaemon
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.util.closeable.IoBaseCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.util.closeable.AbstractInnerCloseable
org.apache.sshd.common.kex.AbstractKexFactoryManager
org.apache.sshd.common.helpers.AbstractFactoryManager
org.apache.sshd.server.SshServer
com.google.gerrit.sshd.SshDaemon
- All Implemented Interfaces:
LifecycleListener
,SshInfo
,Closeable
,AutoCloseable
,Channel
,EventListener
,org.apache.sshd.common.AttributeRepository
,org.apache.sshd.common.AttributeStore
,org.apache.sshd.common.auth.UserAuthFactoriesManager<org.apache.sshd.server.session.ServerSession,
,org.apache.sshd.server.auth.UserAuth, org.apache.sshd.server.auth.UserAuthFactory> org.apache.sshd.common.channel.ChannelListenerManager
,org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolver
,org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolverManager
,org.apache.sshd.common.Closeable
,org.apache.sshd.common.FactoryManager
,org.apache.sshd.common.forward.PortForwardingEventListenerManager
,org.apache.sshd.common.io.IoServiceEventListenerManager
,org.apache.sshd.common.kex.extension.KexExtensionHandlerManager
,org.apache.sshd.common.kex.KexFactoryManager
,org.apache.sshd.common.keyprovider.KeyPairProviderHolder
,org.apache.sshd.common.PropertyResolver
,org.apache.sshd.common.session.ReservedSessionMessagesManager
,org.apache.sshd.common.session.SessionDisconnectHandlerManager
,org.apache.sshd.common.session.SessionHeartbeatController
,org.apache.sshd.common.session.SessionListenerManager
,org.apache.sshd.common.session.UnknownChannelReferenceHandlerManager
,org.apache.sshd.common.signature.SignatureFactoriesHolder
,org.apache.sshd.common.signature.SignatureFactoriesManager
,org.apache.sshd.server.ServerAuthenticationManager
,org.apache.sshd.server.ServerFactoryManager
,org.apache.sshd.server.session.ServerProxyAcceptorHolder
public class SshDaemon
extends org.apache.sshd.server.SshServer
implements SshInfo, LifecycleListener
SSH daemon to communicate with Gerrit.
Use a Git URL such as ssh://${email}@${host}:${port}/${path}
, e.g.
ssh://[email protected]@gerrit.com:8010/tools/gerrit.git
to access the SSH daemon itself.
Versions of Git before 1.5.3 may require setting the username and port properties in the
user's ~/.ssh/config
file, and using a host alias through a URL such as
gerrit-alias:/tools/gerrit.git
:
Host gerrit-alias
User [email protected]
Hostname gerrit.com
Port 8010
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable.State
Nested classes/interfaces inherited from interface org.apache.sshd.common.AttributeRepository
org.apache.sshd.common.AttributeRepository.AttributeKey<T>
Nested classes/interfaces inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
org.apache.sshd.common.session.SessionHeartbeatController.HeartbeatType
-
Field Summary
Fields inherited from class org.apache.sshd.server.SshServer
acceptor, DEFAULT_SERVICE_FACTORIES, DEFAULT_SSH_SERVER_FACTORY, host, port
Fields inherited from class org.apache.sshd.common.helpers.AbstractFactoryManager
agentFactory, channelFactories, channelListenerProxy, channelListeners, executor, fileSystemFactory, forwarderFactory, forwardingFilter, globalRequestHandlers, ioServiceFactory, ioServiceFactoryFactory, randomFactory, serviceFactories, sessionListenerProxy, sessionListeners, sessionTimeoutListener, shutdownExecutor, timeoutListenerFuture, tunnelListenerProxy, tunnelListeners
Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, state
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
Fields inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolver
NONE
Fields inherited from interface org.apache.sshd.common.FactoryManager
DEFAULT_VERSION
Fields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY
Fields inherited from interface org.apache.sshd.server.ServerAuthenticationManager
DEFAULT_USER_AUTH_GSS_FACTORY, DEFAULT_USER_AUTH_KB_INTERACTIVE_FACTORY, DEFAULT_USER_AUTH_PASSWORD_FACTORY, DEFAULT_USER_AUTH_PUBLIC_KEY_FACTORY
-
Method Summary
Methods inherited from class org.apache.sshd.server.SshServer
createAcceptor, createSessionFactory, getActiveSessions, getBoundAddresses, getCommandFactory, getGSSAuthenticator, getHost, getHostBasedAuthenticator, getHostKeyCertificateProvider, getInnerCloseable, getKeyboardInteractiveAuthenticator, getKeyPairProvider, getPasswordAuthenticator, getPort, getPublickeyAuthenticator, getServerProxyAcceptor, getSessionFactory, getShellFactory, getSubsystemFactories, getUserAuthFactories, isStarted, open, setCommandFactory, setGSSAuthenticator, setHost, setHostBasedAuthenticator, setHostKeyCertificateProvider, setKeyboardInteractiveAuthenticator, setKeyPairProvider, setPasswordAuthenticator, setPort, setPublickeyAuthenticator, setServerProxyAcceptor, setSessionFactory, setShellFactory, setSubsystemFactories, setUpDefaultServer, setUserAuthFactories, stop, toString
Methods inherited from class org.apache.sshd.common.helpers.AbstractFactoryManager
addChannelListener, addPortForwardingEventListener, addSessionListener, attributeKeys, clearAttributes, computeAttributeIfAbsent, createSessionTimeoutListener, getAgentFactory, getAttribute, getAttributesCount, getChannelFactories, getChannelListenerProxy, getChannelStreamWriterResolver, getFileSystemFactory, getForwarderFactory, getForwardingFilter, getGlobalRequestHandlers, getIoServiceEventListener, getIoServiceFactory, getIoServiceFactoryFactory, getNioWorkers, getParentPropertyResolver, getPortForwardingEventListenerProxy, getProperties, getRandomFactory, getReservedSessionMessagesHandler, getScheduledExecutorService, getServiceFactories, getSessionDisconnectHandler, getSessionListenerProxy, getUnknownChannelReferenceHandler, getVersion, removeAttribute, removeChannelListener, removePortForwardingEventListener, removeSessionListener, removeSessionTimeout, resolveUnknownChannelReferenceHandler, setAgentFactory, setAttribute, setChannelFactories, setChannelStreamWriterResolver, setFileSystemFactory, setForwarderFactory, setForwardingFilter, setGlobalRequestHandlers, setIoServiceEventListener, setIoServiceFactoryFactory, setNioWorkers, setParentPropertyResolver, setRandomFactory, setReservedSessionMessagesHandler, setScheduledExecutorService, setScheduledExecutorService, setServiceFactories, setSessionDisconnectHandler, setUnknownChannelReferenceHandler, setupSessionTimeout, stopSessionTimeoutListener
Methods inherited from class org.apache.sshd.common.kex.AbstractKexFactoryManager
getCipherFactories, getCompressionFactories, getDelegate, getKexExtensionHandler, getKeyExchangeFactories, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKexExtensionHandler, setKeyExchangeFactories, setMacFactories, setSignatureFactories
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediately
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListener
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.AttributeRepository
attributeKeys, getAttribute, getAttributesCount
Methods inherited from interface org.apache.sshd.common.AttributeStore
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttribute
Methods inherited from interface org.apache.sshd.common.channel.ChannelListenerManager
addChannelListener, getChannelListenerProxy, removeChannelListener
Methods inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolverManager
getChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolver
Methods inherited from interface org.apache.sshd.common.Closeable
close, isOpen
Methods inherited from interface org.apache.sshd.common.FactoryManager
getAgentFactory, getAgentForwardingFilter, getChannelFactories, getFileSystemFactory, getForwarderFactory, getForwardingFilter, getGlobalRequestHandlers, getIoServiceFactory, getRandomFactory, getScheduledExecutorService, getServiceFactories, getTcpForwardingFilter, getVersion, getX11ForwardingFilter, resolveAttribute
Methods inherited from interface org.apache.sshd.common.io.IoServiceEventListenerManager
getIoServiceEventListener, setIoServiceEventListener
Methods inherited from interface org.apache.sshd.common.kex.extension.KexExtensionHandlerManager
getKexExtensionHandler, setKexExtensionHandler
Methods inherited from interface org.apache.sshd.common.kex.KexFactoryManager
getCipherFactories, getCipherFactoriesNameList, getCipherFactoriesNames, getCompressionFactories, getCompressionFactoriesNameList, getCompressionFactoriesNames, getKeyExchangeFactories, getMacFactories, getMacFactoriesNameList, getMacFactoriesNames, setCipherFactories, setCipherFactoriesNameList, setCipherFactoriesNames, setCipherFactoriesNames, setCompressionFactories, setCompressionFactoriesNameList, setCompressionFactoriesNames, setCompressionFactoriesNames, setKeyExchangeFactories, setMacFactories, setMacFactoriesNameList, setMacFactoriesNames, setMacFactoriesNames
Methods inherited from interface org.apache.sshd.common.forward.PortForwardingEventListenerManager
addPortForwardingEventListener, getPortForwardingEventListenerProxy, removePortForwardingEventListener
Methods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty, isEmpty
Methods inherited from interface org.apache.sshd.common.session.ReservedSessionMessagesManager
getReservedSessionMessagesHandler, setReservedSessionMessagesHandler
Methods inherited from interface org.apache.sshd.server.ServerAuthenticationManager
setUserAuthFactoriesNames
Methods inherited from interface org.apache.sshd.common.session.SessionDisconnectHandlerManager
getSessionDisconnectHandler, setSessionDisconnectHandler
Methods inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
disableSessionHeartbeat, getSessionHeartbeatInterval, getSessionHeartbeatType, setSessionHeartbeat, setSessionHeartbeat
Methods inherited from interface org.apache.sshd.common.session.SessionListenerManager
addSessionListener, getSessionListenerProxy, removeSessionListener
Methods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesHolder
getSignatureFactories, getSignatureFactoriesNameList, getSignatureFactoriesNames
Methods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesManager
setSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNames
Methods inherited from interface org.apache.sshd.common.session.UnknownChannelReferenceHandlerManager
getUnknownChannelReferenceHandler, resolveUnknownChannelReferenceHandler, setUnknownChannelReferenceHandler
Methods inherited from interface org.apache.sshd.common.auth.UserAuthFactoriesManager
getUserAuthFactoriesNameList, getUserAuthFactoriesNames, setUserAuthFactoriesNameList, setUserAuthFactoriesNames
-
Method Details
-
getHostKeys
- Specified by:
getHostKeys
in interfaceSshInfo
-
getIoAcceptor
public org.apache.sshd.common.io.IoAcceptor getIoAcceptor() -
start
public void start()Description copied from interface:LifecycleListener
Invoked when the server is starting.- Specified by:
start
in interfaceLifecycleListener
- Overrides:
start
in classorg.apache.sshd.server.SshServer
-
stop
public void stop()Description copied from interface:LifecycleListener
Invoked when the server is stopping.- Specified by:
stop
in interfaceLifecycleListener
- Overrides:
stop
in classorg.apache.sshd.server.SshServer
-
checkConfig
protected void checkConfig()- Overrides:
checkConfig
in classorg.apache.sshd.server.SshServer
-