i wandering whether there valid solution have remote terminal openwrt-box out of nodejs-app? connecting terminal works: ssh -i ~/.mykeys/id_rsa root@192.168.178.39 busybox v1.23.2 (2015-04-22 23:25:48 utc) built-in shell (ash) root@openwrt:~# the only interactive ssh solution nodejs doesn't interactive part described in readme.md following: var client = require('ssh2').client; var conn = new client(); conn.on('ready', function() { console.log('client :: ready'); conn.shell(function(err, stream) { if (err) throw err; stream.on('close', function() { console.log('stream :: close'); conn.end(); }).on('data', function(data) { console.log('stdout: ' + data); }).stderr.on('data', function(data) { console.log('stderr: ' + data); }); stream.end('ls -l\nexit\n'); }); }).connect({ host: '192.168.100.100', port: 22, username...
Comments
Post a Comment