SSH.IsAuthenticated
-------------------

Queries the authentication state.

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

MBS( "SSH.IsAuthenticated"; SSH ) 

**MBS**( **"SSH.IsAuthenticated";** /\* Queries the authentication state. \*/  
**$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

Queries the authentication state.  
Returns 1 if authenticated or 0 if not.  
### Examples

Check status:

 If \[ MBS ( "SSH.IsAuthenticated"; $ssh ) ≠ 1 \]  
 Show Custom Dialog \[ Title: "Authentication"; Message: "no authenticated. Supported ways: " &amp; $authuserlist ; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” \]  
End If  
### See also

- [MongoDB.Connect](MongoDBConnect.md)
- [SQL.Connect](SQLConnect.md)
- [SSH.Connect](SSHConnect.md)
- [SSH.Execute](SSHExecute.md)
- [SSH.New](SSHNew.md)
- [SSH.Tunnel.Run](SSHTunnelRun.md)

### Example Databases

- [Network/SSH Tunnel](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Network/SSH%20Tunnel.shtml#1ScriptAnchor_)
- [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 21st December 2020

  
[SSH.HostKeyHash](SSHHostKeyHash.md) - [SSH.List](SSHList.md)

[HTML Version](SSHIsAuthenticated.shtml)