SSH.GetExitState
----------------

Get the remote exit code.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SSH](component_SSH.md) | [6.3](newinversion63.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "SSH.GetExitState"; SSH ) 

**MBS**( **"SSH.GetExitState";** /\* Get the remote exit code. \*/  
**$SSH**) /\* The SSH session reference number from the plugin. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SSH | The SSH session reference number from the plugin. | $ssh |

### Result

Returns state or error.

### Description

Get the remote exit code.  
Returns the exit code raised by the process running on the remote host at the other end of the named channel. Note that the exit status may not be available if the remote end has not yet set its status to closed.  
Returns 0 on failure, otherwise the Exit Status reported by remote host.  
This function checks for a license.

Created 29th May 2016 , last changed 29th May 2016

  
[SSH.FreeChannel](SSHFreeChannel.md) - [SSH.GetIP](SSHGetIP.md)

[HTML Version](SSHGetExitState.shtml)