Skip to main content

Overview

This page documents all exported types and interfaces from the React Native SSH SFTP library. These types provide strong type safety for TypeScript users and define the data structures used throughout the library.

Enums

PtyType

Represents the types of PTY (pseudo-terminal) for SSH connections.
Values: Usage:

Interfaces

KeyPair

Represents a key pair used for SSH authentication.
Properties: Usage:

LsResult

Represents the result of a directory listing operation.
Properties: Usage:

GeneratedKeyPair

Represents the result of a key pair generation operation.
The lowercase genKeyPair name is still exported as a deprecated alias for backward compatibility and will be removed in a future major version. Use GeneratedKeyPair in new code.
Properties: Usage:

KeyDetails

Represents the details of an SSH key.
The lowercase keyDetail name is still exported as a deprecated alias for backward compatibility and will be removed in a future major version. Use KeyDetails in new code.
Properties: Usage:

Type Aliases

PasswordOrKey

Represents a password or key for authentication. Can be either a string (password) or a KeyPair object.
Usage: This type is used internally by the SSHClient constructor to accept either password or key-based authentication:

CallbackFunction

Represents a callback function with an optional response.
Type Parameters: Parameters: Usage:

EventHandler

Represents an event handler function for SSH events.
Parameters: Usage:

SSHClient Class

Complete API reference for the SSHClient class

Static Methods

Static methods for connecting and key generation
Last modified on July 4, 2026