How to use the node-ssh.sftp function in node-ssh

To help you get started, we’ve selected a few node-ssh 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 mikedeboer / jsDAV / lib / DAV / backends / sftp / tree.js View on Github external
initialize: function(options) {
        this.basePath = (options.sftp && options.sftp.home) || "";
        this.sftp = new Sftp();
        var self = this;
        this.timeout = 0;
        this.sftp.init(options.sftp, function(err) {
            // throw it anyway, because it's fatal...
            if (err)
                throw err;
            self.sftp.connect(function(err){
                if (err)
                    throw err;
            });
        });
        AsyncEventEmitter.DEFAULT_TIMEOUT = 10000;
    },

node-ssh

SSH2 with Promises

MIT
Latest version published 12 days ago

Package Health Score

80 / 100
Full package analysis

Popular node-ssh functions