Step 3, Enable Secure Shell (SSH)
The SSH protocol is designed to maintain a secure connection between two systems—in this case, your local working environment and your Magento Enterprise Cloud Edition Git project.
You must create an SSH keypair on every machine with which you and your team expect to interact with Magento Enterprise Cloud Edition. You must set up SSH keys as the Magento file system owner.
Locate an existing SSH keypair
An existing SSH keypair is typically located in the
.ssh subdirectory of the user’s home directory. To see if you already have keys, enter the following command:
If you have SSH keys, a directory listing is displayed similar to the following:
id_rsa id_rsa.pub known_hosts
If you don’t have SSH keys, continue with the next section.
If you already have SSH keys, you can skip the next section and continue with Add a public SSH key to your account.
Create a new SSH keypair
ssh-keygen command to create an SSH keypair.
ssh-keygen is typically installed on Linux systems.
For more information:
- How To Set Up SSH Keys (Digitalocean)
- Manually generating your SSH key in Windows
- ssh-keygen man page
The command syntax follows:
ssh-keygen -t rsa -C "firstname.lastname@example.org"
Follow the prompts on your screen to complete the task.
Add a public SSH key to your account
You can add SSH keys to your account in any of the following ways:
- Using the Magento Enterprise Cloud Edition CLI
- Using the Magento Enterprise Cloud Edition Web Interface
Add a key using the CLI
To add an SSH key using the CLI:
- If you haven’t done so already, log in (or switch to) the Magento file system owner to the server on which your SSH keys are located.
Log in to your project:
Add the key:
magento-cloud ssh-key:add ~/.ssh/id_rsa.pub
Add a key using the Web Interface
To add an SSH key using the Web Interface:
Copy your SSH public key to the clipboard.
If you don’t already have SSH keys on that machine, see GitHub documentation to create them. 2. Using the link in your welcome e-mail, access your Magento Enterprise Cloud Edition account.
Log in to your project using Bitbucket, GitHub, Google, or a user name and password.
In the upper right corner of the page, click the Account Settings tab as the following figure shows.
- Expand SSH Keys.
On the next page, click Add a public key as the following figure shows.
- Follow the prompts on your screen to complete the task.