SSH.CloseChannel
----------------

Closes the channel.

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

MBS( "SSH.CloseChannel"; SSH { ; Wait } ) 

**MBS**( **"SSH.CloseChannel";** /\* Closes the channel. \*/  
**$SSH**; /\* The SSH session reference number from the plugin. \*/   
**$Wait**) /\* Optional; Whether to wait if it takes longer. Default is 0.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| SSH | The SSH session reference number from the plugin. | $ssh |  |
| Wait | Whether to wait if it takes longer. Default is 0. | 1 | Optional |

### Result

Returns OK or error.

### Description

Closes the channel.  
This closes it now. Normally all channels are closed automatically when you release connection with [SSH.Release](SSHRelease.md).  
### Examples

Close channel:

 Set Variable \[$r ; Value:MBS ( "SSH.CloseChannel"; $ssh )\]  
### See also

- [SSH.Execute](SSHExecute.md)
- [SSH.FreeChannel](SSHFreeChannel.md)
- [SSH.New](SSHNew.md)
- [SSH.Release](SSHRelease.md)

### Example Databases

- [Network/SSH](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Network/SSH.shtml#1ScriptAnchor_)

This function checks for a license.

Created 29th May 2016 , last changed 12nd November 2017

  
[SQL.isResultSet](SQLisResultSet.md) - [SSH.ConfigureKeepAlive](SSHConfigureKeepAlive.md)

[HTML Version](SSHCloseChannel.shtml)