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]({{ page.baseurl }}cloud/before/before-workspace-file-sys-owner.html).
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:
ls ~/.ssh
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.
Use the 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){:target="_blank"}
- Manually generating your SSH key in Windows{:target="_blank"}
- ssh-keygen man page{:target="_blank"}
The command syntax follows:
ssh-keygen -t rsa -C "your_email_address@example.com"
Follow the prompts on your screen to complete the task.
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
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]({{ page.baseurl }}cloud/before/before-workspace-file-sys-owner.html) to the server on which your SSH keys are located.
-
Log in to your project:
magento-cloud login
-
Add the key:
magento-cloud ssh-key:add ~/.ssh/id_rsa.pub
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{:target="_blank"} 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.
{:width="350px"}
-
In the upper right corner of the page, click the Account Settings tab as the following figure shows.
{:width="550px"}
-
Expand SSH Keys.
-
On the next page, click Add a public key as the following figure shows.
{:width="550px"}
-
Follow the prompts on your screen to complete the task.