Russh Node.js binding

Related tags

Cryptography ssh
Overview

@napi-rs/ssh

CI install size Downloads

πŸš€ Help me to become a full-time open-source developer by sponsoring me on Github

Usage

import { connect, checkKnownHosts } from '@napi-rs/ssh'

const host = '192.168.65.3'
const port = 22

const client = await connect(`${host}:${port}`, {
  checkServerKey: (key) => {
    return checkKnownHosts(host, port, key)
  }
})

await client.authenticateKeyPair('lyn')

const { status, output } = await client.exec('ls -la')
console.log(status, output.toString('utf8'))

// 0 total 292
// drwxr-x--- 11 lyn  lyn    4096 Jan 23 06:39 .
// drwxr-xr-x  3 root root   4096 Jan 19 06:50 ..
// -rw-------  1 lyn  lyn    2065 Jan 20 03:11 .bash_history
// -rw-r--r--  1 lyn  lyn     220 Jan  6  2022 .bash_logout
// -rw-r--r--  1 lyn  lyn    3792 Jan 19 09:11 .bashrc
// drwx------  5 lyn  lyn    4096 Jan 20 03:28 .cache
// -rw-r--r--  1 lyn  lyn     828 Jan 19 09:11 .profile
// drwx------  2 lyn  lyn    4096 Jan 19 09:07 .ssh
// drwxrwxr-x  3 lyn  lyn    4096 Jan 19 09:59 .yarn
// -rw-r--r--  1 lyn  lyn    3922 Jan 20 03:30 .zshrc
You might also like...
Substrate Node for Anmol Network
Substrate Node for Anmol Network

Anmol Substrate Node πŸ–Ό πŸ› οΈ πŸ‘· Anmol is the First Cross-Chain NFT Toolkit, on Polkadot. Introducing: Moulds NFT Breeding Multi-Chain NFT Migration ink

Manager for single node Rancher clusters

Bovine Manage single node Rancher clusters with a single binary, bovine. % bovine run Pulling [rancher/rancher:latest], this may take awhile... Ranche

Minimal Substrate node configured for smart contracts via pallet-contracts.

substrate-contracts-node This repository contains Substrate's node-template configured to include Substrate's pallet-contracts β€’ a smart contract modu

Trinci blockchain node

TRINCI TRINCI Blockchain Node. Requirements The required dependencies to build correctly the project are the following: clang libclang-dev (ver. 11 su

Substrate Node Template Generator

Substrate Node Template Generator A tool to generate stand-alone node templates of a customized Substrate clients used in "Substrate Library Extension

Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

Node implementation for aleph blockchain built with Substrate framework
Node implementation for aleph blockchain built with Substrate framework

This repository contains the Rust implementation of Aleph Zero blockchain node based on the Substrate framework. Aleph Zero is an open-source layer 1

Ecoball Node is the Official Rust implementation of the Ecoball protocol.

Ecoball Node is the Official Rust implementation of the Ecoball protocol. It is a fork of OpenEthereum - https://github.com/openethereum/

Multy-party threshold ECDSA Substrate node

Webb DKG πŸ•ΈοΈ The Webb DKG πŸ§‘β€βœˆοΈ ⚠️ Beta Software ⚠️ Running the DKG Currently the easiest way to run the DKG is to use a 3-node local testnet using dk

Releases(v0.0.1)
  • v0.0.1(Jan 25, 2023)

    @napi-rs/ssh

    import { connect, checkKnownHosts } from './index.js'
    
    const host = '192.168.65.3'
    const port = 22
    
    const client = await connect(`${host}:${port}`, {
      checkServerKey: (key) => {
        return checkKnownHosts(host, port, key)
      }
    })
    
    await client.authenticateKeyPair('lyn')
    
    const { status, output } = await client.exec('ls -la')
    console.log(status, output.toString('utf8'))
    
    // 0 total 292
    // drwxr-x--- 11 lyn  lyn    4096 Jan 23 06:39 .
    // drwxr-xr-x  3 root root   4096 Jan 19 06:50 ..
    // -rw-------  1 lyn  lyn    2065 Jan 20 03:11 .bash_history
    // -rw-r--r--  1 lyn  lyn     220 Jan  6  2022 .bash_logout
    // -rw-r--r--  1 lyn  lyn    3792 Jan 19 09:11 .bashrc
    // drwx------  5 lyn  lyn    4096 Jan 20 03:28 .cache
    // -rw-r--r--  1 lyn  lyn     828 Jan 19 09:11 .profile
    // drwx------  2 lyn  lyn    4096 Jan 19 09:07 .ssh
    // drwxrwxr-x  3 lyn  lyn    4096 Jan 19 09:59 .yarn
    // -rw-r--r--  1 lyn  lyn    3922 Jan 20 03:30 .zshrc
    

    Full Changelog: https://github.com/Brooooooklyn/ssh/commits/v0.0.1

    Source code(tar.gz)
    Source code(zip)
Owner
LongYinan
TypeScript at day, Rustacean at night. Coding for fun.
LongYinan
Simple node and rust script to achieve an easy to use bridge between rust and node.js

Node-Rust Bridge Simple rust and node.js script to achieve a bridge between them. Only 1 bridge can be initialized per rust program. But node.js can h

Pure 5 Apr 30, 2023
Sample lightning node command-line app built on top of Ldk Node (similar to ldk-sample).

ldk-node-sample Sample lightning node command-line app built on top of Ldk Node (similar to ldk-sample ). Installation git clone https://github.com/op

optout 3 Nov 21, 2023
A rust binding for nodejs to generate md5 hash value

Hasher A rust binding for creating node module to generate md5 hash value This project was bootstrapped by create-neon. Installing hasher Installing h

Md. Al-Amin 0 Nov 7, 2021
L2 validity rollup combined with blind signatures over elliptic curves inside zkSNARK, to provide offchain anonymous voting with onchain binding execution on Ethereum

blind-ovote Blind-OVOTE is a L2 voting solution which combines the validity rollup ideas with blind signatures over elliptic curves inside zkSNARK, to

Aragon ZK Research 3 Nov 18, 2022
Binding generator for EVM and ink!

Sumi is a binding generator specifically designed for Astar Network ecosystem with XVM in mind. It takes EVM metadata and converts it to an ink! modul

Dmitry 4 Dec 15, 2022
Polkadot Node Implementation

Polkadot Implementation of a https://polkadot.network node in Rust based on the Substrate framework. NOTE: In 2018, we split our implementation of "Po

Parity Technologies 6.5k Jan 6, 2023
β‹°Β·β‹° Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate.

β‹°Β·β‹° Feeless What is Feeless? Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate. This is not the official project for Nano, only an

null 127 Dec 5, 2022
Statemint Node Implementation

Statemint Implementation of Statemint, a blockchain to support generic assets in the Polkadot and Kusama networks. Statemint will allow users to: Depl

Parity Technologies 72 Oct 30, 2022
Basilisk node - cross-chain liquidity protocol built on Substrate

Basilisk node Local Development Follow these steps to prepare a local Substrate development environment ??️ Simple Setup Install all the required depe

Galactic Council 52 Dec 27, 2022
A node API for the dprint TypeScript and JavaScript code formatter

dprint-node A node API for the dprint TypeScript and JavaScript code formatter. It's written in Rust for blazing fast speed. Usage Pass a file path an

Devon Govett 431 Dec 24, 2022