Skip to main content

How to connect to a site via SFTP/SSH

Connect to your site securely using SFTP for file transfers or SSH for command-line access.

Overview

You can access your site's files directly using SFTP for file transfers, or SSH for command-line tasks like running WP-CLI commands or checking logs. Both connection types use your SSH key rather than a password, keeping access to your site secure.

SFTP is available on every site by default, provided you have created an SSH key pair. SSH access works differently: it is not enabled by default, and you will need to contact our support team first so they can turn it on for you. This only takes a few minutes.

In this article, you will find what to prepare before connecting, and step by step instructions for connecting via SFTP and via SSH.


Prerequisites

Before connecting, make sure you have:

  • SSH key pair: An active key pair for your site. If you have not created one yet, see How to create an SSH key pair on Levamo.

  • File access details: Found under Sites → Manage site → Manage → File access.

  • A client: An SFTP client such as FileZilla, WinSCP, or Cyberduck for file transfers, or a terminal application such as Terminal on macOS/Linux or PowerShell on Windows for SSH.

Levamo supports key-based authentication only. Password-based logins are not available.

Important:

SSH access is not enabled by default. If you plan to connect via SSH, contact our support team to have it activated for your site before continuing. SFTP does not require this step.


How to connect via SFTP

SFTP lets you upload, download, and manage your site's files securely, using your SSH key pair for authentication. It's useful for tasks like uploading themes or plugins, editing configuration files, or downloading a copy of your content.

The steps below use FileZilla as an example, but the same details work with any SFTP client.

Step 1: Find your file access details

Log in to the dashboard and go to Sites. Click Manage site next to the site you want to access, then select Manage, followed by File access.

Note the following details from this page:

  • Host

  • User

  • Port: 22

Step 2: Connect using your SFTP client

Open your SFTP client and create a new connection using the details from Step 1.

In FileZilla, this looks like:

  1. Go to File → Site Manager → New Site.

  2. Set the Protocol to SFTP, SSH File Transfer Protocol.

  3. Enter the Host, Port (22), and User from your File access page.

  4. Set Logon Type to Key file, and browse to your .pem or .ppk file.

  5. Click Connect, and approve the host fingerprint if prompted.

Step 3: Locate your webroot

Once connected, your site's files are located at:

/home/web_<your-site-name>/web/www/app/public

This folder contains your WordPress installation, including wp-content, wp-admin, and wp-includes.

Note: Staging sites use the same connection process, with a unique user in the format web_stg-<your-site-name>.

Important:

Avoid modifying files outside this directory unless you are an advanced user or are following guidance from our support team.


How to connect via SSH

SSH gives you direct command-line access to your environment. It's useful for running WP-CLI commands, troubleshooting, or checking logs.

Important:

SSH is not enabled by default. Contact our support team to have it turned on before following the steps below.

Once SSH is enabled, your credentials will appear on the same File access page used for SFTP.

macOS or Linux

Step 1: Prepare your key file

Move your private key to your .ssh folder, if it is not there already:

mv ~/Downloads/<your-key>.pem ~/.ssh/

Restrict access to the key file:

chmod 600 ~/.ssh/<your-key>.pem

Step 2: Connect

Open Terminal and run:

ssh -i ~/.ssh/<your-key>.pem user@host

Type yes if asked to trust the host fingerprint.

Step 3: Navigate to your webroot

cd web/www/app/public

Windows

Step 1: Prepare your key file

Move your .pem file to C:\Users\YourName\.ssh\, then restrict access to it using File Explorer, or by running:

cd C:\Users\YourName\.ssh

icacls.exe your-key.pem /inheritance:r /remove Everyone Users Administrators SYSTEM

icacls.exe your-key.pem /grant "$($env:USERNAME):(F)"

Step 2: Connect

Open PowerShell and run:

ssh -i "C:\Users\YourName\.ssh\<your-key>.pem" user@host

Type yes when prompted to trust the host fingerprint.

Step 3: Navigate to your webroot

cd web/www/app/public


Important information

  • SSH activation affects the whole environment: Once SSH is enabled, you can navigate into any site on that environment, but you can only edit files owned by the site whose credentials you connected with. If you manage multiple environments, each one needs SSH enabled separately.

  • One set of credentials per site: Each site has its own SFTP and, once enabled, SSH credentials. Use the credentials shown on that site's File access page.

  • File paths: Your WordPress installation is always located at /home/web_<your-site-name>/web/www/app/public.

  • Permissions: Do not change file or folder permissions unless instructed by our support team. Incorrect permissions can break your site or block access.

  • Security: Only connect from trusted networks and devices, and keep your private key stored securely.


Conclusion

SFTP and SSH give you secure, password-free access to your site, whether you need to transfer files or run commands directly. SFTP works as soon as you have a key pair, while SSH needs to be enabled by our support team for each site.

If you run into any issues connecting, our support team is available 24/7.

Did this answer your question?