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.

  1. Log into your User Portal account by following these instructions.

  2. In the instance drop-down, select the instance for which you would like to create SSH access.

  3. If you plan to use a single SSH key for multiple instances, follow this guide.

  4. To add SSH access for a single instance, follow this guide.

Remove SSH User

  1. Log into your User Portal account by following these instructions.

  2. In the instance drop-down, select the instance from which you would like to remove SSH access.

  3. Open the SSH Access section.

  4. Click the red delete button next to the username to remove access.

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