Comment on page
SSH / SFTP Access
Give access your team and your partners to your assets and code without
After building an environment, once the platform and Cloud resources have been properly configured, the status of the environment changes to
Online. At this point, it becomes possible to initiate an SSH connection to the main Web server.
Depending on the selected platform type (Starter or Scalable), you will have one or more web servers to absorb the traffic to your application. The main web server is the machine from which scheduled tasks (CRON) are configured and executed. These tasks are not configured on all web servers because they need to run only once, hence the existence of a main server.
The following instructions explain how to connect to the main Web server using an SSH client.
Before attempting to initiate an SSH connection to the main server, please make sure that you meet the following prerequisites:
- 1.Check that the environment is ready to receive an SSH connection (the environment must have the
- 2.Check that you are authorised to connect through SSH to the main server of the environment you are interested in (from Environment → Settings → Access)
- 3.Check that your current IP is authorised to connect to the instance (from Environment → Settings → Security).
- 5.If needed, install an SSH client on your computer
SSH key added in Artifakt:
- Must be the public key.
- The format should be RSA (including -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- delimiters for the private key).
- No passphrase needed for the key.
To initiate the SSH connection, open a Terminal window and type the following command, replacing the variables with the values corresponding to your environment.
$ ssh [PROJECT_ID]-[PROJECT_CODE]-[USERNAME]@[MAIN_SERVER_IP]
Go to Environment → Settings → Access to find the specific command you can run for your environment. Alternatively, you can also click directly on Run the command to start a Terminal window from the Artifakt Console.
Run the command
SFTP connection allows you to connect to the persistent disk shared between all web servers available to an environment. This persistent disk stores usually all your assets and persistent data such as images, export files...
For security reasons, you cannot access your source code or any server's files via SFTP.
Before attempting to initiate an SFTP connection, please make sure that you meet the following prerequisites:
- 1.Check that the environment is ready to receive an SFTP connection (the environment must have the
Onlinestatus as well as the servers)
- 2.Make sure you have a valid SFTP account and your credentials are correct (from Environment → Settings → Access)
- 3.Check your network is allowed to make external connection on port 22 especially if you are working from your company office.
To create an SFTP account, you need to define a few parameters:
- Login – Can contain alphanumeric, lowercase characters, as well as dashes (-) or underscores (_).
- Password – Must contain at least 1 lower case letter, 1 upper case letter, 1 number, 1 special character and be at least 8 characters long.
- Directories – A list of paths to which the SFTP user will have access. It's a multi-path field, so after adding the first folder path, please press ENTER to validate the path and be able to write an other one. These folder paths must be located inside the
/mnt/shared/folder (root of the persistent disk). Paths must neither begin nor end with a slash (/) character. For example, if you enter
media/image, the SFTP user will have access to
/mnt/shared/media/imageand all subfolders. If you decide to leave this field blank, the SFTP user will have access to the whole
Go to Environment → Settings → Access to retrieve your SFTP user's credentials. Then, start your FTP client, fill in the required information to initiate the connection :
- Host – By default, main server's IP address.
- Username – Defined when creating the account.
- Password – Defined when creating the account
- Port – Always 22 (default SFTP port).
After a successful connection to the server, you should find yourself at the root of the persistent disk (in the directory
/mnt/shared). If you encounter any trouble to connect, please verify the prerequisites.
You cannot create or upload files in the root folder of the disk, use the different folders mount within your code source (e.g. media, var, ...).