How to use ssh2-promise - 4 common examples

To help you get started, we’ve selected a few ssh2-promise 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 sanketbajoria / cloudconnect / src / app / applications / term / index.js View on Github external
const { clipboard } = require('electron');
const SSHUtils = require('ssh2-promise').Utils;

class Term{
    constructor($elem, ssh){
        this.$elem = $elem;
        this.ssh = ssh;
        this.$header = $elem.parent().find('.header');
        this.resizeListener = function(){
            this.term.fit();
            this.term.buffer.y--
            this.term.scroll();
            setTimeout(() => {
                this.term.fit();
                this.term.buffer.y--
                this.term.scroll();
            }, 200)
        }.bind(this);
github sanketbajoria / cloudconnect / src / app / applications / term / index.js View on Github external
this.term.on('close', () => {
                    SSHUtils.endSocket(socket);
                    socket.close();
                });
                this.term.on('resize', () => {
github sanketbajoria / cloudconnect / src / app / applications / term / index.js View on Github external
close(){
        SSHUtils.endSocket(this.__socket);   
        this.term.clearCursorBlinkingInterval();
        this.term.removeAllListeners('data');
        this.term.removeAllListeners('close');
        this.term.destroy();
        $(window).off("resize", this.resizeListener);
    }
github sanketbajoria / cloudconnect / src / app / applications / scullog / sftpFileManager.js View on Github external
constructor(scullog, tunnel, app) {
    super(scullog);
    this.app = app;
    this.tunnel = tunnel;
    this.sftp = new SFTP(this.tunnel);
  }

ssh2-promise

Promise wrapper around SSH2 library

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis