Skip to content

SSH.SSHException

Andrew Lambert edited this page Jun 18, 2023 · 13 revisions

SSH.SSHException

Class Declaration

 Protected Class SSHException
 Inherits RuntimeException

Remarks

This exception type is raised whenever the binding detects that an error has occurred. The ErrorNumber and Message properties will usually provide information about what the error was.

Error numbers

The ErrorNumber property may contain an error number from one of three sources: libssh2 itself, the binding, or the Xojo TCPSocket. For consistency with libssh2's error numbers, all error numbers from the binding and the TCPSocket are negative numbers; binding errors by design, TCPSocket errors by negation of the actual socket error number (so error 102 becomes -102, etc).

Name Number Comment
LIBSSH2_ERROR_* -1 to -99 libssh2 error numbers
Reserved -100 to -101 Reserved.
ERR_CONNECTION_REFUSED -102 Xojo socket error 102.
ERR_RESOLVE -103 Xojo socket error 103.
ERR_PORT_IN_USE -105 Xojo socket error 105.
ERR_ILLEGAL_OPERATION -106 Xojo socket error 106.
ERR_INVALID_PORT -107 Xojo socket error 107.
Reserved -108 to -499 Reserved.
ERR_INIT_FAILED -500 Initializing the libssh2 shared library failed for unknown reasons.
ERR_SOCKET -501 Reserved.
ERR_HOSTKEY_NOTFOUND -502 The server was not found in the known hosts list.
ERR_HOSTKEY_MISMATCH -503 The server was found in the known hosts lists, however its fingerprint has changed.
ERR_INVALID_SCHEME -504 You must specify either SFTP or SCP in the url.
ERR_LENGTH_REQUIRED -505 SCP requires that the upload size be specified in advance.
ERR_SESSION_MISMATCH -506 Objects from different sessions cannot interact.
ERR_INVALID_INDEX -507 The specified index is out of bounds.
ERR_USERNAME_REQUIRED -508 All SSH authentication methods require a username.
ERR_TIMEOUT_ELAPSED -509 The TCP connection was not established within the specified timeout period.
ERR_NOT_AUTHENTICATED -510 This operation can only be performed by authenticated users.
ERR_TOO_MANY_TRANSFERS -511 Adding another transfer to this SFTPTransferQueue would exceed its maximum allowed number of pending transfers.
ERR_TOO_LATE -512 This operation can only be performed at an earlier stage in the process.
ERR_APPEND_ONLY -513 The specified stream was opened for appending only.
ERR_SCP_LENGTH_EXCEEDED -514 Writing the specified data would exceed the pre-defined length of the file.
ERR_SIZE_REQUIRED -515 Cannot use a MemoryBlock of unknown size.
ERR_TOO_EARLY -516 This operation can only be performed at a later stage in the process.
ERR_INFINITE_STREAM -517 This stream has no defined length or position.
ERR_NO_AGENT -518 Unable to connect to the authentication agent.
Clone this wiki locally