# Connect to a storage box
Source: https://docs.infraista.com/en/data-storage/backup-storage/connect-to-a-storage-box



Every protocol signs in as the box's main user (or a [sub-account](/en/data-storage/backup-storage/sub-accounts))
on the box's host. Find both, and each protocol's port, on the box's **Overview** under **Connection**.

## Protocols [#protocols]

Turn protocols on and off on the box's **Access & protocols** tab. Turn on only what you use.

| Protocol           | Port                               | Use it for                                                                                      |
| ------------------ | ---------------------------------- | ----------------------------------------------------------------------------------------------- |
| **SFTP / SCP**     | Shown on the Overview (usually 22) | Encrypted file transfer: WinSCP, FileZilla, Cyberduck, scripts. The safest default              |
| **rsync over SSH** | 23                                 | Incremental sync: only changed files are sent. The same switch turns **BorgBackup** on          |
| **WebDAV**         | 443 (HTTPS)                        | Windows Explorer, macOS Finder and WebDAV clients, also behind strict firewalls. Not on Starter |
| **FTP**            | 21                                 | Old devices and tools that support nothing else                                                 |

**restic** works over SFTP, so it's available whenever SFTP is on.

<Callout type="warn">
  FTP is unencrypted: the password and files travel in plain text. Turn it on only for
  a device that can't use SFTP, and off again when you're done.
</Callout>

The **Access & protocols** tab shows ready-to-copy commands for each protocol with your box's host,
username and ports filled in.

<Shot name="data-storage/backup-storage/access" alt="The Access and protocols tab: protocol switches with their ports and connection examples, and who can reach the box" />

## Examples [#examples]

Replace `u100001` and `sb100001.backup.infraista.cloud` with your username and host, and use the ports
your Overview shows.

**SFTP and SCP**

```bash
sftp u100001@sb100001.backup.infraista.cloud
scp ./project.tar.gz u100001@sb100001.backup.infraista.cloud:archive/
```

If your SFTP port isn't 22, add `-P <port>` to `sftp` and `scp`.

**WebDAV**: open `https://sb100001.backup.infraista.cloud/` in Windows Explorer, macOS Finder (**Go ›
Connect to Server**) or any WebDAV client, and sign in with the username and password.

**FTP**

```bash
ftp sb100001.backup.infraista.cloud
```

For rsync, BorgBackup and restic, see [Back up with rsync, BorgBackup and
restic](/en/data-storage/backup-storage/back-up-with-rsync-borg-and-restic).

## Sign in with an SSH key [#sign-in-with-an-ssh-key]

Add keys to the main user on the **Access & protocols** tab, or pick saved keys when you create the box.
Keys work for SFTP, SCP, rsync, BorgBackup and restic; FTP, WebDAV and the web panel always use the
password.

## Limit who can connect [#limit-who-can-connect]

On **Access & protocols**:

* **Reachable from the internet** off: only Infraista servers on the private network can connect.
* On, with an empty **IP allowlist**: any IP address can try to sign in.
* On, with addresses or ranges in the allowlist (for example `203.0.113.10` or `203.0.113.0/24`): only
  those can connect.

## If something goes wrong [#if-something-goes-wrong]

* **Permission denied**: check the username (`u` plus the box number), the password or key, and that
  the protocol is turned on.
* **Connection refused or times out**: check the port on the Overview, and that your address is in the
  allowlist if one is set.
* **The password stopped working**: someone may have reset it. Reset it again on **Settings** and update
  your tools.

## Related [#related]

* [Back up with rsync, BorgBackup and restic](/en/data-storage/backup-storage/back-up-with-rsync-borg-and-restic)
* [Sub-accounts](/en/data-storage/backup-storage/sub-accounts)
