public abstract class AbstractSshServer
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Field and Description |
---|---|
protected com.sshtools.common.policy.FileFactory |
fileFactory |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSshServer() |
|
AbstractSshServer(java.net.InetAddress addressToBind,
int port) |
|
AbstractSshServer(int port) |
|
AbstractSshServer(java.lang.String addressToBind,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
addAuthenticator(com.sshtools.common.auth.Authenticator provider) |
void |
addGlobalRequestHandler(com.sshtools.synergy.ssh.GlobalRequestHandler<SshServerContext> handler) |
void |
addHostKey(com.sshtools.common.ssh.components.SshKeyPair key) |
void |
addHostKeys(java.util.Collection<com.sshtools.common.ssh.components.SshKeyPair> hostKeys) |
void |
addHostKeys(com.sshtools.common.ssh.components.SshKeyPair... hostKeys) |
void |
addInterface(java.lang.String addressToBind,
int portToBind) |
void |
addInterface(java.lang.String addressToBind,
int portToBind,
com.sshtools.synergy.nio.ProtocolContextFactory<?> contextFactory) |
protected void |
afterStart() |
protected void |
beforeStart() |
void |
close() |
void |
configure(SshServerContext sshContext,
java.nio.channels.SocketChannel sc) |
protected void |
configureAuthentication(SshServerContext sshContext,
java.nio.channels.SocketChannel sc) |
protected void |
configureChannels(SshServerContext sshContext,
java.nio.channels.SocketChannel sc) |
protected void |
configureFilesystem(SshServerContext sshContext,
java.nio.channels.SocketChannel sc) |
protected void |
configureForwarding(SshServerContext sshContext,
java.nio.channels.SocketChannel sc) |
protected void |
configureHostKeys(SshServerContext sshContext,
java.nio.channels.SocketChannel sc) |
SshServerContext |
createServerContext(com.sshtools.synergy.nio.SshEngineContext daemonContext,
java.nio.channels.SocketChannel sc) |
void |
disableSCP() |
void |
enableSCP() |
protected com.sshtools.synergy.ssh.ChannelFactory<SshServerContext> |
getChannelFactory() |
abstract com.sshtools.synergy.nio.ProtocolContextFactory<?> |
getDefaultContextFactory() |
com.sshtools.synergy.nio.SshEngine |
getEngine() |
com.sshtools.common.policy.FileFactory |
getFileFactory() |
com.sshtools.common.forwarding.ForwardingPolicy |
getForwardingPolicy() |
java.util.Collection<com.sshtools.common.ssh.components.SshKeyPair> |
getHostKeys() |
com.sshtools.common.permissions.IPPolicy |
getIPPolicy() |
int |
getPort() |
com.sshtools.common.ssh.SecurityLevel |
getSecurityLevel() |
com.sshtools.common.ssh.AbstractRequestFuture |
getShutdownFuture() |
boolean |
isRunning() |
void |
removeInterface(java.lang.String addressToBind,
int portToBind) |
void |
setChannelFactory(com.sshtools.synergy.ssh.ChannelFactory<SshServerContext> channelFactory) |
void |
setConfigFolder(java.io.File confFolder) |
void |
setFileFactory(com.sshtools.common.policy.FileFactory fileFactory) |
void |
setIPPolicy(com.sshtools.common.permissions.IPPolicy ipPolicy) |
void |
setSecurityLevel(com.sshtools.common.ssh.SecurityLevel securityLevel) |
void |
start() |
void |
start(boolean requireListeningInterface) |
void |
stop() |
protected AbstractSshServer()
public AbstractSshServer(int port) throws java.net.UnknownHostException
java.net.UnknownHostException
public AbstractSshServer(java.lang.String addressToBind, int port) throws java.net.UnknownHostException
java.net.UnknownHostException
public AbstractSshServer(java.net.InetAddress addressToBind, int port)
public abstract com.sshtools.synergy.nio.ProtocolContextFactory<?> getDefaultContextFactory()
public void setConfigFolder(java.io.File confFolder)
public void start() throws java.io.IOException
java.io.IOException
public void setSecurityLevel(com.sshtools.common.ssh.SecurityLevel securityLevel)
public com.sshtools.common.ssh.SecurityLevel getSecurityLevel()
public void addInterface(java.lang.String addressToBind, int portToBind) throws java.io.IOException
java.io.IOException
public void addInterface(java.lang.String addressToBind, int portToBind, com.sshtools.synergy.nio.ProtocolContextFactory<?> contextFactory) throws java.io.IOException
java.io.IOException
public void removeInterface(java.lang.String addressToBind, int portToBind) throws java.net.UnknownHostException
java.net.UnknownHostException
public void addGlobalRequestHandler(com.sshtools.synergy.ssh.GlobalRequestHandler<SshServerContext> handler)
public void start(boolean requireListeningInterface) throws java.io.IOException
java.io.IOException
public boolean isRunning()
public void stop()
public void addHostKeys(java.util.Collection<com.sshtools.common.ssh.components.SshKeyPair> hostKeys)
public void addHostKeys(com.sshtools.common.ssh.components.SshKeyPair... hostKeys)
public void addHostKey(com.sshtools.common.ssh.components.SshKeyPair key)
public void addAuthenticator(com.sshtools.common.auth.Authenticator provider)
public void setFileFactory(com.sshtools.common.policy.FileFactory fileFactory)
public com.sshtools.common.policy.FileFactory getFileFactory()
public void setChannelFactory(com.sshtools.synergy.ssh.ChannelFactory<SshServerContext> channelFactory)
public com.sshtools.common.permissions.IPPolicy getIPPolicy()
public void setIPPolicy(com.sshtools.common.permissions.IPPolicy ipPolicy)
public void enableSCP()
public void disableSCP()
public int getPort()
protected void beforeStart()
protected void afterStart()
public com.sshtools.common.ssh.AbstractRequestFuture getShutdownFuture()
protected void configureHostKeys(SshServerContext sshContext, java.nio.channels.SocketChannel sc) throws java.io.IOException, com.sshtools.common.ssh.SshException
java.io.IOException
com.sshtools.common.ssh.SshException
public java.util.Collection<com.sshtools.common.ssh.components.SshKeyPair> getHostKeys()
protected void configureFilesystem(SshServerContext sshContext, java.nio.channels.SocketChannel sc) throws java.io.IOException, com.sshtools.common.ssh.SshException
java.io.IOException
com.sshtools.common.ssh.SshException
protected void configureAuthentication(SshServerContext sshContext, java.nio.channels.SocketChannel sc) throws java.io.IOException, com.sshtools.common.ssh.SshException
java.io.IOException
com.sshtools.common.ssh.SshException
protected com.sshtools.synergy.ssh.ChannelFactory<SshServerContext> getChannelFactory()
protected void configureChannels(SshServerContext sshContext, java.nio.channels.SocketChannel sc) throws java.io.IOException, com.sshtools.common.ssh.SshException
java.io.IOException
com.sshtools.common.ssh.SshException
protected void configureForwarding(SshServerContext sshContext, java.nio.channels.SocketChannel sc) throws java.io.IOException, com.sshtools.common.ssh.SshException
java.io.IOException
com.sshtools.common.ssh.SshException
public SshServerContext createServerContext(com.sshtools.synergy.nio.SshEngineContext daemonContext, java.nio.channels.SocketChannel sc) throws java.io.IOException, com.sshtools.common.ssh.SshException
java.io.IOException
com.sshtools.common.ssh.SshException
public void configure(SshServerContext sshContext, java.nio.channels.SocketChannel sc) throws java.io.IOException, com.sshtools.common.ssh.SshException
java.io.IOException
com.sshtools.common.ssh.SshException
public com.sshtools.synergy.nio.SshEngine getEngine()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public com.sshtools.common.forwarding.ForwardingPolicy getForwardingPolicy()
Copyright © 2023. All rights reserved.