How to use @electerm/ssh2 - 3 common examples

To help you get started, we’ve selected a few @electerm/ssh2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electerm / electerm / app / server / terminal.js View on Github external
return new Promise((resolve, reject) => {
      const conn = new Client()
      const opts = Object.assign(
        {
          tryKeyboard: true
        },
        {
          readyTimeout: _.get(initOptions, 'readyTimeout'),
          keepaliveInterval: _.get(initOptions, 'keepaliveInterval'),
          agent: process.env.SSH_AUTH_SOCK,
          algorithms: alg
        },
        _.pick(initOptions, [
          'host',
          'port',
          'username',
          'password',
          'privateKey',
github electerm / electerm / app / server / sftp.js View on Github external
constructor () {
    this.client = new Client()
  }
github electerm / electerm / app / server / connection-hopping.js View on Github external
return new Promise((resolve, reject) => {
        let conn1 = new Client()
        conn1.on('ready', () => {
          conn1.forwardOut(
            '127.0.0.1',
            port,
            nextHostConfig.host,
            nextHostConfig.port,
            (err, stream) => {
              if (err) {
                conn1.end()
                return reject(err)
              }
              return stream
            }
          )
        }).connect({
          ...hostConfig,

@electerm/ssh2

SSH2 client and server modules written in pure JavaScript for node.js

MIT
Latest version published 1 year ago

Package Health Score

57 / 100
Full package analysis

Popular @electerm/ssh2 functions