# SFTP

SFTP (SSH File Transfer Protocol) works by using a secure shell data stream. It establishes a secure connection and then provides a higher level of protection for data while transferring it.

## SFTP Access

### Using account SSH key integration (preferred way)

Using this method you will not need to copy-paste your key for each environment. It will be linked to your ReadyMage account.

#### Add SSH Key to your account

Navigate to **Account -> Integrations**.

<figure><img src="/files/uZAOSaTsmYSGiX5Kl1TM" alt=""><figcaption></figcaption></figure>

Click **Add Key**.

<figure><img src="/files/pjSKFmfIm00aFXPK7Fm1" alt=""><figcaption></figcaption></figure>

Enter your SSH Public Key and click **Save**.

<figure><img src="/files/eIQz5UEfgT6hdwOqova5" alt=""><figcaption></figcaption></figure>

After saving, the SSH key will be partially visible in the integrations.

<figure><img src="/files/cKbpu6sf376a8FADMLlk" alt=""><figcaption></figcaption></figure>

#### Grant user access to SFTP

Navigate to **User Portal → Project → Selected Instance → Service Management → SFTP** tab. Click **Add User** and select User by email.

<figure><img src="/files/z0PJKKxKHqQkRIdlwHp4" alt=""><figcaption></figcaption></figure>

### Using SSH key

Navigate to the **User Portal → Project → Selected Instance → Application Management → SFTP** tab. Click **Add SFTP Key**, fill in your SSH username, and add your SSH Public Key or leave it empty to get a **one-time** generated password.

<figure><img src="/files/GID5FQIovUiE6XwmExB5" alt=""><figcaption></figcaption></figure>

## Directory mapping

Following directories are available on the SFTP server and mapped to appropriate directories in Magento 2 root:

* `/import` -> `<magento2_root>/var/import`
* `/export` -> `<magento2_root>/var/export`
* `/media` -> `<magento2_root>/pub/media`

## Connect to SFTP server

Connection details are available in the SFTP tab in the Service Management section.

{% hint style="warning" %}
SFTP does not grant access to Magento 2 and ScandiPWA source files. Code changes and extension installation require [local setup](https://help.readymage.com/project-development/code-customization-and-local-setup).
{% endhint %}

### Connect using FileZilla

To connect to the SFTP server you can use a free cross-platform client like [FileZilla](https://filezilla-project.org/).

1. Open FileZilla.
2. Go to Edit > Settings > Connection > SFTP
3. Add your private SSH key using Add key file button.
4. Enter Host, Username, and Port in Quickconnect fields.
5. Press Quickconnect.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.readymage.com/service-management/sftp-access.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
