public class SshKeyScanMain extends Object implements Channel, Callable<Void>, ServerKeyVerifier, SessionListener, org.apache.sshd.common.util.logging.SimplifiedLog
SessionListener.Event| Modifier and Type | Field and Description |
|---|---|
static List<String> |
DEFAULT_KEY_TYPES
Default key types if not overridden from the command line
|
static Level |
DEFAULT_LEVEL |
static long |
DEFAULT_TIMEOUT |
EMPTY| Constructor and Description |
|---|
SshKeyScanMain() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalidateListenervalidateListenerlogpublic static final List<String> DEFAULT_KEY_TYPES
public static final long DEFAULT_TIMEOUT
public static final Level DEFAULT_LEVEL
public int getPort()
public void setPort(int port)
public InputStream getInputStream()
public void setInputStream(InputStream input)
public long getTimeout()
public void setTimeout(long timeout)
public Level getLogLevel()
public void setLogLevel(Level level)
public void log(Level level, Object message, Throwable t)
log in interface org.apache.sshd.common.util.logging.SimplifiedLogpublic boolean isEnabled(Level level)
isEnabled in interface org.apache.sshd.common.util.logging.SimplifiedLogprotected void resolveServerKeys(SshClient client, String host, Map<String,List<KeyPair>> pairsMap, Map<String,List<NamedFactory<org.apache.sshd.common.signature.Signature>>> sigFactories) throws IOException
IOExceptionprotected void resolveServerKeys(SshClient client, String host, String kt, List<KeyPair> ids) throws Exception
Exceptionpublic void sessionCreated(Session session)
sessionCreated in interface SessionListenerpublic void sessionEvent(Session session, SessionListener.Event event)
sessionEvent in interface SessionListenerpublic void sessionException(Session session, Throwable t)
sessionException in interface SessionListenerpublic void sessionClosed(Session session)
sessionClosed in interface SessionListenerpublic void sessionNegotiationStart(Session session, Map<KexProposalOption,String> clientProposal, Map<KexProposalOption,String> serverProposal)
sessionNegotiationStart in interface SessionListenerprotected void logNegotiationProposal(String type, Map<KexProposalOption,String> proposal)
public void sessionNegotiationEnd(Session session, Map<KexProposalOption,String> clientProposal, Map<KexProposalOption,String> serverProposal, Map<KexProposalOption,String> negotiatedOptions, Throwable reason)
sessionNegotiationEnd in interface SessionListenerpublic boolean verifyServerKey(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)
verifyServerKey in interface ServerKeyVerifierprotected void writeServerKey(String remoteLocation, String keyType, PublicKey serverKey) throws Exception
Exceptionprotected List<NamedFactory<org.apache.sshd.common.signature.Signature>> resolveSignatureFactories(String keyType) throws GeneralSecurityException
GeneralSecurityExceptionprotected Map<String,List<KeyPair>> createKeyPairs(Collection<String> typeNames) throws GeneralSecurityException
GeneralSecurityExceptionprotected List<KeyPair> createKeyPairs(String keyType) throws GeneralSecurityException
GeneralSecurityExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionpublic static List<String> parseCommandLineArguments(SshKeyScanMain scanner, String... args) throws IOException
IOExceptionpublic static <S extends SshKeyScanMain> S setInputStream(S scanner, Collection<String> hosts) throws IOException
IOExceptionpublic static <S extends SshKeyScanMain> S initializeScanner(S scanner, Collection<String> hosts) throws IOException
IOExceptionCopyright © 2018 The Apache Software Foundation. All rights reserved.