# SMB

### Prerequisites

Before continuing, make sure that the following steps have been completed:

* NoPorts has been installed on both machines.
* Your NoPorts atSigns are activated, and the associated keys are saved locally.

If you haven’t completed these steps, follow the appropriate installation guide on the [Installation Instructions](https://docs.noports.com/installation) page, then return here once finished.

### Command Line

The command should look like:

```
npt -f @<client> -t @<device> -d <device name> -r @<relay> -p 445 \
-h 192.168.1.90 -l 9000
```

Example:

```
npt -f @alice_client -t @alice_device -d my_server -r @rv_am -p 445 \
-h 192.168.1.90 -l 9000
```

{% hint style="info" %}
NOTE Make sure the sshnpd daemon is allowing port 445 to the SMB file server see Basic Usage for details.
{% endhint %}

Now you can mount the SMB share locally using the finder app ( Go->Connect to server) on MacOs

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2Fgit-blob-82501f922e131595fb817bfe9ddbcf3ed6544d85%2FScreenshot%202024-07-03%20at%2019.52.04.png?alt=media" alt=""><figcaption></figcaption></figure>

Once mounted, you can use the file share as normal. As you dismount the file share, the NPT command will disconnect.

{% hint style="info" %}
Windows mounting on a non-standard port is currently not supported by Microsoft but they are working on it.

If you need this functionality, it is possible but fiddly to set up. Contact us if you want to know how.
{% endhint %}

### To learn more about NPT

{% content-ref url="../usage/basic-usage" %}
[basic-usage](https://docs.noports.com/usage/basic-usage)
{% endcontent-ref %}

### Desktop Application

When using the NoPorts desktop application, your connection profile should look something like this:

|                   |                   |
| ----------------- | ----------------- |
| **Profile Name**  | My SMB Connection |
| **Device atSign** | @alice\_device    |
| **Device Name**   | my\_server        |
| **Relay**         | @rv\_am           |
| **Local Port**    | 9000              |
| **Local Host**    | localhost         |
| **Remote Host**   |                   |
| **Remote Port**   | 445               |
