> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/lan-turtle-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/lan-turtle-hub/payload-development/duckyscript-for-lan-turtle/ssh_firewall.md).

# SSH\_FIREWALL

## SSH\_FIREWALL

The `SSH_FIREWALL` command manipulates access to the LAN Turtle Hub SSH service.

By default, access is allowed on all interfaces.  Access can be restricted to the USB, RJ45 Ethernet or WiFi client connection.

Access is always available from the WiFi Management AP (if one is configured).

### Options

The `SSH_FIREWALL` command expects the firewall mode:

```
SSH_FIREWALL ALL | ETHERNET | USB | WIFI
```

#### ALL

Allow access to SSH from all interfaces.

#### ETHERNET

Allow access to SSH only from the RJ45 Ethernet interface.

#### USB

Allow access to SSH only from the USB-C connection.

#### WIFI

Allow access only from the WiFi client connection (if one exists).

### Example

`SSH_FIREWALL ETHERNET`

{% hint style="warning" %}
WiFi access

Remember - if you remove access from non-WiFi interfaces, you will *only* be able to configure the LAN Turtle Hub when the WiFi is active!
{% endhint %}

{% hint style="danger" %}
Locked out?

Accidentally locked out of the management interface?  See the [Failsafe and Recovery](https://documentation.hak5.org/lan-turtle-hub/upgrading-and-recovery/failsafe-and-recovery.md) guide for more information to get back into your device!
{% endhint %}
