New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sumor/ssh-tools

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sumor/ssh-tools

SSH connections and tools that are simple, easy to use, and scalable.

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
41K
decreased by-14.33%
Maintainers
0
Weekly downloads
 
Created
Source

ssh-tools

SSH connections and tools that are simple, easy to use, and scalable.

CI Test Coverage Audit

Installation

npm install ssh-tools --save

Prerequisites

Node.JS version

Require Node.JS version 18.x or above

Usage

SSH Connection

const SSH = require('@sumor/ssh-tools')
const ssh = SSH({
  // fake server details, replace with your own
  host: '62.16.12.88',
  iHost: '172.11.200.330',
  port: 22,
  username: 'root',
  password: 'password'
})

await ssh.connect()
await ssh.disconnect()

SSH Command

const SSH = require('@sumor/ssh-tools')
const ssh = SSH(server)

await ssh.connect()
try {
  const result = await ssh.exec('ls -la')
  console.log(result)
  await ssh.disconnect()
} catch (error) {
  await ssh.disconnect() // don't forget to disconnect if error occurs
  throw error
}

More examples

Please check the Unit Test

Keywords

FAQs

Package last updated on 22 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc