//[ConnectBot SSH Library](../../index.md)/[org.connectbot.sshlib](index.md)

# Package-level declarations

## Types

| Name | Summary |
|---|---|
| [AgentIdentity](-agent-identity/index.md) | [jvm]<br>data class [AgentIdentity](-agent-identity/index.md)(val publicKeyBlob: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html), val comment: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val destinationConstraints: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[DestinationConstraint](-destination-constraint/index.md)&gt;? = null)<br>A public key identity available in the agent. |
| [AgentKeySpec](-agent-key-spec/index.md) | [jvm]<br>data class [AgentKeySpec](-agent-key-spec/index.md)(val keyBlob: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html), val isCa: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html))<br>A host key specification used in destination constraints. |
| [AgentProvider](-agent-provider/index.md) | [jvm]<br>interface [AgentProvider](-agent-provider/index.md)<br>Provider interface for SSH agent forwarding. |
| [AgentResult](-agent-result/index.md) | [jvm]<br>sealed interface [AgentResult](-agent-result/index.md)&lt;out [T](-agent-result/index.md)&gt;<br>Result of an [AgentProvider](-agent-provider/index.md) callback. |
| [AgentSignatureFlags](-agent-signature-flags/index.md) | [jvm]<br>object [AgentSignatureFlags](-agent-signature-flags/index.md)<br>Signature flags for agent sign requests. |
| [AgentSigningContext](-agent-signing-context/index.md) | [jvm]<br>data class [AgentSigningContext](-agent-signing-context/index.md)(val publicKeyBlob: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html), val dataToSign: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html), val flags: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val sessionId: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html), val serverHostKey: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html), val isBound: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html))<br>Context for agent signing decisions. |
| [AuthHandler](-auth-handler/index.md) | [jvm]<br>interface [AuthHandler](-auth-handler/index.md)<br>Callback-driven authentication handler. |
| [AuthPublicKey](-auth-public-key/index.md) | [jvm]<br>data class [AuthPublicKey](-auth-public-key/index.md)(val algorithmName: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val publicKeyBlob: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html))<br>An SSH public key for authentication probing. |
| [AuthResult](-auth-result/index.md) | [jvm]<br>sealed interface [AuthResult](-auth-result/index.md)<br>Result of [SshClient.authenticatePassword](-ssh-client/authenticate-password.md), [SshClient.authenticatePublicKey](-ssh-client/authenticate-public-key.md), [SshClient.authenticateKeyboardInteractive](-ssh-client/authenticate-keyboard-interactive.md), and [SshClient.authenticate](-ssh-client/authenticate.md). |
| [ConnectionInfo](-connection-info/index.md) | [jvm]<br>data class [ConnectionInfo](-connection-info/index.md)(val kexAlgorithm: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val serverHostKeyAlgorithm: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val encryptionAlgorithmC2S: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val encryptionAlgorithmS2C: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val macAlgorithmC2S: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)?, val macAlgorithmS2C: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)?)<br>Negotiated algorithm details for an established SSH connection. |
| [ConnectResult](-connect-result/index.md) | [jvm]<br>sealed interface [ConnectResult](-connect-result/index.md)<br>Result of [SshClient.connect](-ssh-client/connect.md). |
| [DestinationConstraint](-destination-constraint/index.md) | [jvm]<br>data class [DestinationConstraint](-destination-constraint/index.md)(val fromHostname: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val fromKeyspecs: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[AgentKeySpec](-agent-key-spec/index.md)&gt;, val toUsername: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val toHostname: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val toHostspecs: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[AgentKeySpec](-agent-key-spec/index.md)&gt;)<br>One hop entry in a destination constraint for a key in the agent. |
| [HostKeyVerifier](-host-key-verifier/index.md) | [jvm]<br>interface [HostKeyVerifier](-host-key-verifier/index.md)<br>Verifies the identity of a server by checking its host key. |
| [KeyboardInteractiveCallback](-keyboard-interactive-callback/index.md) | [jvm]<br>interface [KeyboardInteractiveCallback](-keyboard-interactive-callback/index.md)<br>Callback for keyboard-interactive authentication (RFC 4256). |
| [KeyFingerprint](-key-fingerprint/index.md) | [jvm]<br>object [KeyFingerprint](-key-fingerprint/index.md)<br>SSH key fingerprint utilities. |
| [KnownHostsVerifier](-known-hosts-verifier/index.md) | [jvm]<br>class [KnownHostsVerifier](-known-hosts-verifier/index.md)(file: [File](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/File.html), hostname: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), port: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 22) : [HostKeyVerifier](-host-key-verifier/index.md)<br>A host key verifier that reads from an OpenSSH-style `known_hosts` file. |
| [PingResult](-ping-result/index.md) | [jvm]<br>sealed class [PingResult](-ping-result/index.md)<br>Result of a [SshClient.ping](-ssh-client/ping.md) call. |
| [PortForwarder](-port-forwarder/index.md) | [jvm]<br>interface [PortForwarder](-port-forwarder/index.md) : [AutoCloseable](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html)<br>Handle to an active port forwarding. |
| [PublicKey](-public-key/index.md) | [jvm]<br>data class [PublicKey](-public-key/index.md)(val type: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val encoded: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html))<br>A generic public key representation. |
| [SessionExit](-session-exit/index.md) | [jvm]<br>sealed interface [SessionExit](-session-exit/index.md)<br>How the remote process on a session channel terminated (RFC 4254 section 6.10). |
| [SftpAttributes](-sftp-attributes/index.md) | [jvm]<br>data class [SftpAttributes](-sftp-attributes/index.md)(val size: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)? = null, val uid: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)? = null, val gid: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)? = null, val permissions: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)? = null, val atime: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)? = null, val mtime: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)? = null)<br>File attributes for SFTP operations (SFTPv3 ATTRS structure). |
| [SftpClient](-sftp-client/index.md) | [jvm]<br>interface [SftpClient](-sftp-client/index.md) : [AutoCloseable](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html)<br>SFTP client for file transfer over SSH (draft-ietf-secsh-filexfer). |
| [SftpDirectoryEntry](-sftp-directory-entry/index.md) | [jvm]<br>data class [SftpDirectoryEntry](-sftp-directory-entry/index.md)(val filename: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val longname: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val attrs: [SftpAttributes](-sftp-attributes/index.md))<br>Entry from an SFTP directory listing. |
| [SftpException](-sftp-exception/index.md) | [jvm]<br>class [SftpException](-sftp-exception/index.md)(val statusCode: [SftpStatusCode](-sftp-status-code/index.md), message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), cause: [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)? = null) : [SshException](-ssh-exception/index.md)<br>Exception thrown for SFTP protocol errors. |
| [SftpFileHandle](-sftp-file-handle/index.md) | [jvm]<br>class [SftpFileHandle](-sftp-file-handle/index.md)<br>Opaque file or directory handle returned by SFTP open/opendir operations. |
| [SftpOpenFlag](-sftp-open-flag/index.md) | [jvm]<br>enum [SftpOpenFlag](-sftp-open-flag/index.md) : [Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)&lt;[SftpOpenFlag](-sftp-open-flag/index.md)&gt; <br>Flags for SFTP file open operations. |
| [SftpResult](-sftp-result/index.md) | [jvm]<br>sealed interface [SftpResult](-sftp-result/index.md)&lt;out [T](-sftp-result/index.md)&gt;<br>Result type for SFTP operations. Replaces thrown exceptions with a sealed interface so callers can handle errors structurally. |
| [SftpStatusCode](-sftp-status-code/index.md) | [jvm]<br>enum [SftpStatusCode](-sftp-status-code/index.md) : [Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)&lt;[SftpStatusCode](-sftp-status-code/index.md)&gt; <br>SFTP status codes (draft-ietf-secsh-filexfer-02 section 7). |
| [Socks5Authenticator](-socks5-authenticator/index.md) | [jvm]<br>interface [Socks5Authenticator](-socks5-authenticator/index.md)<br>Authenticator for SOCKS5 username/password auth (RFC 1929). |
| [SshClient](-ssh-client/index.md) | [jvm]<br>class [SshClient](-ssh-client/index.md)<br>High-level async SSH client API. |
| [SshClientConfig](-ssh-client-config/index.md) | [jvm]<br>class [SshClientConfig](-ssh-client-config/index.md)<br>Configuration for SSH client connections. |
| [SshException](-ssh-exception/index.md) | [jvm]<br>open class [SshException](-ssh-exception/index.md)(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), cause: [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)? = null) : [Exception](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html) |
| [SshKeys](-ssh-keys/index.md) | [jvm]<br>object [SshKeys](-ssh-keys/index.md)<br>Key management utilities for SSH private keys. |
| [SshSession](-ssh-session/index.md) | [jvm]<br>interface [SshSession](-ssh-session/index.md) : [AutoCloseable](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html)<br>Represents an SSH session channel (RFC 4254 section 6). |
| [SshSigning](-ssh-signing/index.md) | [jvm]<br>object [SshSigning](-ssh-signing/index.md)<br>Utility for signing authentication data with local private keys. |
| [StreamForwarder](-stream-forwarder/index.md) | [jvm]<br>interface [StreamForwarder](-stream-forwarder/index.md) : [AutoCloseable](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html)<br>Handle to an active stream forwarding through SSH. |

## Functions

| Name | Summary |
|---|---|
| [getOrNull](get-or-null.md) | [jvm]<br>fun &lt;[T](get-or-null.md)&gt; [SftpResult](-sftp-result/index.md)&lt;[T](get-or-null.md)&gt;.[getOrNull](get-or-null.md)(): [T](get-or-null.md)?<br>Convenience: extract value or null for success, throws nothing. |
| [getOrThrow](get-or-throw.md) | [jvm]<br>fun &lt;[T](get-or-throw.md)&gt; [SftpResult](-sftp-result/index.md)&lt;[T](get-or-throw.md)&gt;.[getOrThrow](get-or-throw.md)(): [T](get-or-throw.md)<br>Convenience: extract value or throw for interop with blocking APIs. |