-
Notifications
You must be signed in to change notification settings - Fork 0
Simpe SSH client example
Fredrick Lusako Mwasekaga edited this page Sep 11, 2019
·
3 revisions
//TODO : add shell and execute support for linux and windows
var ssh_client = SshClient.create("127.0.0.1",22,"test_person");
ssh_client.addPasswordAuthentication("1234");
ssh_client.onHostKeyReceived(function(hotkey){
console.log("onHostKeyReceived");
console.log(hotkey);
});
ssh_client.onExecuted(function(cmd, result){
console.log("Command "+cmd+" | Result "+result);
});
ssh_client.onError(function(exception){
console.log("Error client: "+exception);
});
ssh_client.connect();
//ssh_client.execute("dir");