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
Generate the SSH key by entering the following command in the Terminal window:
ssh-keygen -t rsa
When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key.
Type in a passphrase. You can also hit the ENTER key to accept the default (no passphrase).
After you confirm the passphrase the system generates the key pair.
Your private key is saved to the id_rsa file in the .ssh directory. Do not share it with anyone.
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
Generate the SSH key by entering the following command in the Terminal window:
ssh-keygen -t rsa
When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key.
Type in a passphrase. You can also hit the ENTER key to accept the default (no passphrase).
After you confirm the passphrase the system generates the key pair.
Your private key is saved to the id_rsa file in the .ssh directory. Do not share it with anyone.
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
You must redeploy your instance after adding or removing the SSH user in the User Portal to make it work.
Log into your User Portal account by following the instructions here.
Select the instance you would like to create SSH access for in the instance drop-down.
Open the SSH Access tab under the Application Management section.
Click Add User.
Enter SSH Username, this will be added ending to your generated SSH Username which will help you to identify which users have been created.
Enter your computer Public Key that you will be using to connect.
Click Add User.
Redeploy your instance by navigating to the Deployments tab in the Application Management section and clicking the Start Deployment button.
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
Log into your User Portal account by following the instructions here.
Select the instance you would like to SSH connect to.
Open the SSH Access tab under the Application Management section.
Press copy next to your Username to copy the command.
Paste the command into Terminal and hit enter.
SSH Usage
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