Socket
Socket
Sign inDemoInstall

ssh2-connect

Package Overview
Dependencies
6
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3

4

CHANGELOG.md
# Changelog
## Version 2.0.3
* readme: convert usage example to js
## Version 2.0.2

@@ -5,0 +9,0 @@

2

package.json
{
"name": "ssh2-connect",
"description": "Callback-based api behind ssh2 to open an SSH connection",
"version": "2.0.2",
"version": "2.0.3",
"author": "David Worms <david@adaltas.com>",

@@ -6,0 +6,0 @@ "contributors": [],

@@ -15,11 +15,16 @@ [![Build Status](https://secure.travis-ci.org/adaltas/node-ssh2-connect.png)][travis]

```coffee
ssh2 = require 'ssh2'
connection = new ssh2()
connection.on 'error', (err) ->
connection.end()
# not ready at all
connection.on 'ready', ->
# ready to go
connection.connect options
```js
const ssh2 = require('ssh2')
const connection = new ssh2()
connection.on('error', function(err){
// not ready at all
})
connection.on('ready', function(){
// ready to go
})
connection.connect({
host: 'localhost',
user: 'milou',
password: 'wafwaf'
})
```

@@ -29,6 +34,11 @@

```coffee
connect = require 'ssh2-exec/lib/connect'
connect options, (err, ssh) ->
# this is faster to write
```js
const connect = require('ssh2-connect')
connect({
host: 'localhost',
username: 'milou',
password: 'wafwaf'
}, function(err, ssh){
// this is easier to write
})
```

@@ -71,5 +81,7 @@

```js
connect = require('ssh2-connect');
fs = require('ssh2-fs');
const connect = require('ssh2-connect');
const fs = require('ssh2-fs');
// Open the connection
connect({host: 'localhost'}, function(err, ssh){
// Create a directory
fs.mkdir(ssh, '/tmp/a_dir', (err, stdout, stderr){

@@ -76,0 +88,0 @@ console.log(stdout);

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc