SSH Access for Magento CLI, database and media

Run Magento CLI commands, create database and media dumps or replace database or media.

Generating your SSH Key and Getting Public Key

Linux

xclip must be installed to generate SSH keys on Linux. Check if you have it installed by running the following command in the terminal:

where xclip

For version >= Ubuntu 20.04

which clip

If the output is nothing then you don't have it installed. Install it by entering the following command in the terminal: sudo apt install xclip

  1. Generate the SSH key by entering the following command in the Terminal window: ssh-keygen -t rsa

  2. When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key.

  3. Type in a passphrase. You can also hit the ENTER key to accept the default (no passphrase).

  4. After you confirm the passphrase the system generates the key pair.

  5. Your private key is saved to the id_rsa file in the .ssh directory. Do not share it with anyone.

  6. Your public key is saved to the id_rsa.pub file. You can copy it by running this: xsel -b < ~/.ssh/id_rsa.pub

Mac

  1. Generate the SSH key by entering the following command in the Terminal window: ssh-keygen -t rsa

  2. When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key.

  3. Type in a passphrase. You can also hit the ENTER key to accept the default (no passphrase).

  4. After you confirm the passphrase the system generates the key pair.

  5. Your private key is saved to the id_rsa file in the .ssh directory. Do not share it with anyone.

  6. Your public key is saved to the id_rsa.pub file. You can copy it by running this: pbcopy < ~/.ssh/id_rsa.pub

Windows

Follow these instructions.

Add SSH User

SSH access doesn't allow you to make code-level changes including enabling or disabling extensions. Perform code changes by following instructions here and enable/disable extensions by following instructions here.

You must redeploy your instance after adding or removing the SSH user in the User Portal to make it work.

  1. Log into your User Portal account by following the instructions here.

  2. Select the instance you would like to create SSH access for in the instance drop-down.

  3. Open the SSH Access tab under the Application Management section.

  4. Click Add User.

  5. Enter SSH Username, this will be added ending to your generated SSH Username which will help you to identify which users have been created.

  6. Enter your computer Public Key that you will be using to connect.

  7. Click Add User.

  8. Redeploy your instance by navigating to the Deployments tab in the Application Management section and clicking the Start Deployment button.

  9. You can remove users by clicking the delete button next to their Username in the SSH Access tab.

Connect to SSH using terminal

If you are not using Terminal to connect to SSH then you might require to enter: Host: ssh.ireland.eu.i.readymage.com (EU Ireland region) ssh.stockholm.eu.i.readymage.com (EU Stockholm region) ssh.ohio.us.i.readymage.com (USA Ohio region) Port: 22

  1. Log into your User Portal account by following the instructions here.

  2. Select the instance you would like to SSH connect to.

  3. Open the SSH Access tab under the Application Management section.

  4. Press copy next to your Username to copy the command.

  5. Paste the command into Terminal and hit enter.

SSH Usage

SSH access doesn't allow you to make code-level changes including enabling or disabling extensions. Perform code changes by following instructions here and enable/disable extensions by following instructions here.

Magento CLI

The list of Magento CLI commands can be found here.

MySQL CLI

Instructions to create a database dump, download the database dump locally, and replace the database on your instance can be found here.

Media management

Instructions to create download media locally or replace media on your instance can be found here.

Additional tools

File compressing tools:

  • gzip

  • tar

  • unzip

  • zcat

  • zip

  • dar

Other useful tools:

  • curl

  • git

  • grep

  • head

  • jq

  • ping

  • pv

  • tail

  • tmux

  • wget

Last updated