cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
600
Views
0
Helpful
0
Replies

JSXAPI ssh or websocket connection

I am using JSXAPI for Node.js to communicate to EX90.

I have used the boiler plate that comes in the docs. However, It exits with an error ("connection failed: handshake, exiting") after running node filename.js.

I tried disabling the https on device but still no go. I can control it with Putty -SHH no issue but does not function with the library for both ssh and wss.

 

Could it be the firewall settings maybe?

const jsxapi = require('jsxapi');

 const xapi = jsxapi.connect("ssh://{ipaddress}", {
     username: 'username',
     password: 'password'
 });

 xapi.on('error', (err) => {
     console.error(`connection failed: ${err}, exiting`); //the err value is "handshake"
     process.exit(1);
 });

 xapi.on('ready', () => {
     console.log("connection successful");
     xapi.status
         .get('Standby')
         .then((status) => {
             console.log(`Current Standby status: ${status.State}`);             
             xapi.close();
         });
 });

 

0 Replies 0