SSH.Tunnel.Cancel
-----------------

Cancel the tunnel.

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

MBS( "SSH.Tunnel.Cancel"; SSH ) 

**MBS**( **"SSH.Tunnel.Cancel";** /\* Cancel the tunnel. \*/  
**$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 OK or error.

### Description

Cancel the tunnel.  
This sets cancel flag, but cancelling happens asynchronous, so please check running flag later.  
Tunnel is automatically cancelled when session is closed.  
### See also

- [MongoDB.Connect](MongoDBConnect.md)
- [SQL.Connect](SQLConnect.md)
- [SSH.Tunnel.Cancelled](SSHTunnelCancelled.md)
- [SSH.Tunnel.Run](SSHTunnelRun.md)

### Release notes

- **Version 12.1**
    - Fixed a problem with tunnel in [SSH](https://www.mbsplugins.eu/component_SSH.shtml) functions, where [SSH.Tunnel.Cancel](https://www.mbsplugins.eu/SSHTunnelCancel.shtml) didn't end the tunnel quickly in some cases.

### Example Databases

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

### Blog Entries

- [MBS FileMaker Plugin, version 12.1pr6](https://www.mbsplugins.de/archive/2022-03-08/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 22nd October 2018 , last changed 22nd October 2018

  
[SSH.Tunnel.BytesSent](SSHTunnelBytesSent.md) - [SSH.Tunnel.Cancelled](SSHTunnelCancelled.md)

[HTML Version](SSHTunnelCancel.shtml)