public class SshException
extends java.lang.Exception
| Modifier and Type | Class and Description |
|---|---|
static class |
SshException.Code
Error code.
|
| Modifier and Type | Field and Description |
|---|---|
static SshException.Code |
ALREADY_OPEN
An attempt was made to 'open' a resource, an
SshPortForward for
example, but the resource was already open. |
static SshException.Code |
AUTHENTICATION_ATTEMPTS_EXCEEDED
Too many authentication attempts
|
static SshException.Code |
AUTHENTICATION_CANCELLED
Authentication was cancelled by user when being prompted for something
(password, passphrase etc)
|
static SshException.Code |
AUTHENTICATION_FAILED
Authentication failed.
|
static SshException.Code |
ENCRYPTED
Attempt to perform an operation that required a decrypted key failed because
the key was still encrypted.
|
static SshException.Code |
FAILED_TO_CONNECT_TO_AGENT
There is an agent, but failed to connect to it.
|
static SshException.Code |
FAILED_TO_OPEN_SHELL
Failed to open shell.
|
static SshException.Code |
GENERAL
General error.
|
static SshException.Code |
HOST_KEY_REJECTED
Host key was rejected.
|
static SshException.Code |
INCORRECT_PASSPHRASE
The provided passphrase is incorrect.
|
static SshException.Code |
IO_ERROR
General I/O error.
|
static SshException.Code |
NO_AGENT
No agent could be found.
|
static SshException.Code |
NOT_ENCRYPTED
An attempt was made to decrypt a key that was not encrypted.
|
static SshException.Code |
NOT_OPEN
An attempt was made to 'close' a resource, an
SshPortForward for
example, but the resource was already closed. |
static SshException.Code |
PASSPHRASE_REQUIRED
A passphrase is required to perform an operation, but was not supplied.
|
static SshException.Code |
PRIVATE_KEY_FORMAT_NOT_SUPPORTED
An attempt was made to write to a private key format that is not
supported.
|
static SshException.Code |
UNSUPPORTED_FEATURE
The
SshConfiguration requested use of a feature not supported by
the provider in use. |
static SshException.Code |
UNSUPPORTED_PROTOCOL_VERSION
The implementation does not support the protocol version request by
SshConfiguration.getProtocolVersion(). |
| Constructor and Description |
|---|
SshException()
Constructor.
|
SshException(SshException.Code code)
Constructor.
|
SshException(SshException.Code code,
java.lang.String message)
Constructor.
|
SshException(SshException.Code code,
java.lang.String message,
java.lang.Throwable cause)
Constructor.
|
SshException(SshException.Code code,
java.lang.Throwable cause)
Constructor.
|
SshException(java.lang.String message)
Constructor.
|
SshException(java.lang.String message,
java.lang.Throwable cause)
Constructor.
|
SshException(java.lang.Throwable cause)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SshException.Code |
getCode()
Get the error code.
|
public static final SshException.Code GENERAL
Throwable.getCause().public static final SshException.Code UNSUPPORTED_PROTOCOL_VERSION
SshConfiguration.getProtocolVersion().public static final SshException.Code ALREADY_OPEN
SshPortForward for
example, but the resource was already open.public static final SshException.Code NOT_OPEN
SshPortForward for
example, but the resource was already closed.public static final SshException.Code UNSUPPORTED_FEATURE
SshConfiguration requested use of a feature not supported by
the provider in use.public static final SshException.Code IO_ERROR
Throwable.getCause().public static final SshException.Code INCORRECT_PASSPHRASE
public static final SshException.Code NOT_ENCRYPTED
public static final SshException.Code PRIVATE_KEY_FORMAT_NOT_SUPPORTED
public static final SshException.Code PASSPHRASE_REQUIRED
public static final SshException.Code AUTHENTICATION_FAILED
public static final SshException.Code AUTHENTICATION_CANCELLED
public static final SshException.Code AUTHENTICATION_ATTEMPTS_EXCEEDED
public static final SshException.Code HOST_KEY_REJECTED
public static final SshException.Code ENCRYPTED
public static final SshException.Code FAILED_TO_OPEN_SHELL
public static final SshException.Code NO_AGENT
public static final SshException.Code FAILED_TO_CONNECT_TO_AGENT
public SshException()
public SshException(java.lang.String message,
java.lang.Throwable cause)
message - messagecause - causepublic SshException(java.lang.String message)
message - messagepublic SshException(java.lang.Throwable cause)
cause - causepublic SshException(SshException.Code code)
code - codepublic SshException(SshException.Code code, java.lang.String message, java.lang.Throwable cause)
code - codemessage - messagecause - causepublic SshException(SshException.Code code, java.lang.String message)
code - codemessage - messagepublic SshException(SshException.Code code, java.lang.Throwable cause)
code - codecause - causepublic SshException.Code getCode()
IO_ERROR may be thrown, or the
provide may add its own codes.Copyright © 2018. All rights reserved.