CommandCompleted Event
Signifies completion of the command execution.
Syntax
sshclient.on('CommandCompleted', [callback])
Callback
The 'callback' is called when the 'CommandCompleted' event is emited.
function(e){ }
The argument 'e' has the following properties:
e.command e.exitStatus e.exitMessage e.exitSignal
Remarks
Subscribe to this event to be notified about completion of the remote command execution. This event fires for every commandin the Commands list. The Command parameter indicates the command being completed.
ExitStatus specifies the command's return code. ExitMessage or ExitSignal parameters provide error details if the command execution was terminated forcefully,