doccam-pi/#test.js#
Hiro Protagonist 066cfb2014 SSH Working!
2017-05-22 18:18:56 +12:00

23 lines
No EOL
710 B
Text

x = require('node-ipc');
//x.config.silent = true;
x.connectTo('ssh-man', function() {
x.of['ssh-man'].on('connect', function() {
let id = (new Date()).getTime();
x.of['ssh-man'].on('success' + id, (data) => {
console.log(data);)
}); x.of['ssh-man'].emit('create_tunnel', {
host: 'cams.doc.govt.nz',
id: id,
username: 'ssh',
sshPort: 54533,
localPort: 8080,
reverse: true,
privateKey: '~/.ssh/test',
serverAliveInterval: 5,
remotePort: 9999,
reverse: true
}, () => {
console.log("here")
});
});
});