MCPcopy Index your code
hub / github.com/azlyth/react-native-ssh

github.com/azlyth/react-native-ssh @v1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.1 ↗ · + Follow
10 symbols 15 edges 4 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

react-native-ssh npm version

A library that allows a React Native app to run commands over SSH.

Usage

This library provides a single method: SSH.execute. Given SSH credentials and a command, a promise is returned. This promise resolves to the command's output as an array of strings.

import SSH from 'react-native-ssh';

config = {user: 'bob', host: 'example.com', password: 'p4$$w0rd'};
command = 'ls -l ~';

SSH.execute(config, command).then(
  result => console.log(result),
  error =>  console.log('Error:', error)
);

// A successful run would output:
// ['file1.txt', 'server.py', 'script.sh']

Installation

Android

  • npm install react-native-ssh --save
  • react-native link react-native-ssh

iOS

  • npm install react-native-ssh --save
  • react-native link react-native-ssh
  • Add pod 'NMSSH', '~> 2.2.5' to your Podfile and install. If you don't have a Podfile:
  • cd ios
  • pod init
  • Edit the newly created Podfile to look like this example
  • pod install
  • Make the Pod headers accessible to react-native-ssh (instructions based on XCode 8.1):
  • Open ios/hooks.xcworkspace in XCode
  • Click on hooks > Libraries > RNSSH.xcodeproj in the Project Navigator
  • Click on RNSSH under Targets
  • Go to Build Settings
  • Add $(SRCROOT)/../../../ios/Pods/Headers/Public to Header Search Paths and make it recursive

Core symbols most depended-on inside this repo

connect
called by 2
android/src/main/java/com/reactnative/ssh/RNSSHModule.java
RNSSHModule
called by 0
android/src/main/java/com/reactnative/ssh/RNSSHModule.java
getName
called by 0
android/src/main/java/com/reactnative/ssh/RNSSHModule.java
execute
called by 0
android/src/main/java/com/reactnative/ssh/RNSSHModule.java
run
called by 0
android/src/main/java/com/reactnative/ssh/RNSSHModule.java
createJSModules
called by 0
android/src/main/java/com/reactnative/ssh/RNSSHPackage.java
createViewManagers
called by 0
android/src/main/java/com/reactnative/ssh/RNSSHPackage.java
createNativeModules
called by 0
android/src/main/java/com/reactnative/ssh/RNSSHPackage.java

Shape

Method 8
Class 2

Languages

Java100%

Modules by API surface

android/src/main/java/com/reactnative/ssh/RNSSHModule.java6 symbols
android/src/main/java/com/reactnative/ssh/RNSSHPackage.java4 symbols

For agents

$ claude mcp add react-native-ssh \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact