Skip to main content

React Native SSH SFTP

A powerful SSH and SFTP client library for React Native applications, providing seamless connectivity to remote servers on both iOS and Android platforms.
On iOS, this package currently doesn’t support the simulator. You will need to run your app on a physical device. See this issue for more details.

Key Features

Multiple Authentication Methods

Support for both password-based and public key authentication with optional passphrase protection

SSH Command Execution

Execute remote commands and receive output with full promise-based API

Interactive Shell Sessions

Start and manage interactive shell sessions with support for multiple PTY types (vanilla, vt100, vt102, vt220, ansi, xterm)

Full SFTP Support

Complete file transfer capabilities including upload, download, directory operations, and progress tracking

Cross-Platform

Works on both iOS (using NMSSH) and Android (using JSch) with a unified API

TypeScript Support

Fully typed API with comprehensive interfaces and type definitions

What You Can Build

With this library, you can build React Native applications that:
  • Execute remote commands on SSH servers
  • Transfer files securely using SFTP
  • Manage remote file systems (create, delete, rename files and directories)
  • Monitor file transfer progress in real-time
  • Maintain interactive shell sessions
  • Connect using password or key-based authentication

Get Started

Platform Support

This library wraps proven SSH/SFTP implementations:
  • iOS: NMSSH (aanah0’s fork with updated libssh)
  • Android: JSch (Matthias Wiedemann fork)

Requirements

  • React Native 0.60 or later (supports autolinking)
  • iOS physical device (simulator not supported)
  • Android: No additional requirements
  • Node.js 18.16.0 or later
  • npm 9.5.0 or later