Package org.dellroad.jct.ssh.simple
Class SimpleConsoleSshServer
java.lang.Object
org.dellroad.jct.ssh.simple.SimpleConsoleSshServer
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for newSimpleConsoleSshServerinstances. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.sshd.server.auth.pubkey.PublickeyAuthenticatorprotected final Execprotected final org.apache.sshd.common.keyprovider.KeyPairProviderprotected final intprotected final org.slf4j.Loggerprotected final booleanprotected final Shellprotected org.apache.sshd.server.SshServer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
-
Field Details
-
log
protected final org.slf4j.Logger log -
exec
-
shell
-
listenPort
protected final int listenPort -
loopbackOnly
protected final boolean loopbackOnly -
authenticator
protected final org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator authenticator -
hostKeyProvider
protected final org.apache.sshd.common.keyprovider.KeyPairProvider hostKeyProvider -
sshd
protected org.apache.sshd.server.SshServer sshd
-
-
Constructor Details
-
SimpleConsoleSshServer
Constructor.- Parameters:
builder- configuration
-
-
Method Details
-
builder
Create an instance builder.- Returns:
- new instance builder
-
start
Start this instance.Does nothing if already started.
- Throws:
IOException- if an I/O error occurs setting up the listen socket
-
stop
public void stop()Stop this instance. -
close
public void close()Close this instance.Delegates to
stop().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-