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") }); }); });