Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var node_ssh, ssh;
- node_ssh = require('node-ssh');
- ssh = new node_ssh();
- ssh.connect({
- host: 'host',
- username: 'username',
- password: 'password'
- }).then(function() {
- ssh.execCommand('ls', {cwd:'/root/softwares', stream:'both'}).then(function(result) {
- console.log('STDOUT: ' + result.stdout);
- console.log('STDERR: ' + result.stderr);
- });
- });
- D:node_ssh_testnode_modulesnode-sshnode_modulesjs-toolkitdistmain.js:21
- promisified.prototype = callback.prototype;
- ^
- TypeError: Cannot read property 'prototype' of undefined
- at promisify (D:node_ssh_testnode_modulesnode-sshnode_modulesjs-toolkitdistmain.js:21:35)
- at Object.<anonymous> (D:node_ssh_testnode_modulesnode-sshDistSSH.js:18:39)
- at Module._compile (module.js:456:26)
- at Object.Module._extensions..js (module.js:474:10)
- at Module.load (module.js:356:32)
- at Function.Module._load (module.js:312:12)
- at Module.require (module.js:364:17)
- at require (module.js:380:17)
- at Object.<anonymous> (D:node_ssh_testtest.js:3:12)
- at Module._compile (module.js:456:26)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement