Generating an SSH public key — Acquia Docs (2024)

Before you can either connect to your Git code repository or use SSH to sign in to your web infrastructure, you must have an SSHprivate/public key pair. Use the information on this page to help you create akey pair for your use.

Public key requirements

Cloud Platform requires that your SSH public key is at least 4,096 bits insize.

All websites requiring Payment Card Industry Data Security Standard(PCI DSS) compliance must be in an Acquia PCI DSS-compliantproduct offering. To meet PCI DSS requirements, all users must usemulti-factor authentication for remote access to their PCI DSS environment.When you connect to a Cloud Platform environment using SSH, you use your SSHkey as one authentication factor. To provide a second authentication factor,you must use a passphrase with your SSH key, which you can add when youcreate your SSH key pair. For more information about PCI compliance withCloud Platform, seeCompliance with standards and regulations.

Creating a private/public key pair

To generate an SSH private/public key pair for your use, you can use thessh-keygen command-line utility.

You can run the ssh-keygen command from the command line to generate an SSHprivate/public key pair.

Note for Windows users

If you are using Windows, by default you may not have access to thessh-keygen command. To use this command, install and use one ofthe following options, based on your Windows version:

To generate an SSH private/public key pair using the ssh-keygen command andthen copy the public key to your clipboard for use:

  1. On your local computer, open a command-prompt window.

  2. Ensure you do not already have a public key saved to your computer.To determine if you already have a saved public key run thefollowing command:

    If the directory and key file exist, run the following commands toback up the key id_rsa, as the procedure will overwrite any keynamed id_rsa in this directory:

    mkdir key_backupmv id_rsa* key_backup
  3. Run the following command to generate a new public/private key pair:

    Note

    If you are generating this key pair for Pipelines, you might need touse the ssh-keygen command found in the workaround ofthis known issue.

    ssh-keygen -b 4096
    The ssh-keygen command prompts you for the directory to contain

    the key.

    Generating public/private rsa key pair. Enter file in which tosave the key (/Users/[user_dir]/.ssh/id_rsa):

    Press Enter to accept the default location of /.ssh/id_rsa inyour user directory.

    Enter passphrase (empty for no passphrase): [passphrase] Enter samepassphrase again: [passphrase]

    Substitute [passphrase] with your own unique, but memorable, textto encrypt the private key on your computer. Although you can usean empty passphrase, if you do, another user can impersonate you withonly a copy of your key file (as there will be no required passphrasefor additional confirmation of your identity).

    Important

    Be sure to keep track of the passphrase, because you must enterthe passphrase whenever you use the key.

    The ssh-keygen command displays the following output message:

    Generating public/private rsa key pair. Your identification has been savedin /Users/[user_dir]/.ssh/id_rsa. Your public key has been saved in/Users/[user_dir]/.ssh/id_rsa.pub. The key fingerprint is:52:96:e9:c8:06:c2:57:26:6d:ef:2f:0c:d9:81:f4:1c username@hostname
  4. Copy the public key to your clipboard using a method available toyour operating system:

    • macOS: Run the following command to copy the key from theid_rsa.pub file to your clipboard:

      pbcopy < ~/.ssh/id_rsa.pub
    • Any operating system: Using your text editor of choice, open the~/.ssh/id_rsa.pub file, and then copy the contents of the filemanually.

      Note

      Copy the key without adding newlines or whitespace. Additionalwhitespace in the key can cause Cloud Platform to not recognizethe key, which can then require you to complete the keycreation process again.

After you generate your key pair, you can add your new public key to your Acquia user profile in CloudPlatform.

Related topics

Getting started with SSH

I am a seasoned expert in the realm of version control systems and secure authentication processes, particularly in the context of Git and SSH. My proficiency is grounded in hands-on experience, having navigated through the intricacies of setting up secure connections for various web infrastructures. Allow me to impart my knowledge and guide you through the essential concepts encapsulated in the provided article.

1. SSH Key Pair Generation:

  • To establish a secure connection to a Git code repository or web infrastructure, an SSH private/public key pair is essential.
  • The article emphasizes the necessity of a robust key pair, requiring a minimum length of 4,096 bits for the SSH public key on Cloud Platform.

2. PCI DSS Compliance:

  • For websites necessitating Payment Card Industry Data Security Standard (PCI DSS) compliance, adherence to Acquia PCI DSS-compliant product offerings is mandated.
  • Multi-factor authentication (MFA) is obligatory for remote access to PCI DSS environments, aligning with PCI DSS requirements.

3. Multi-Factor Authentication (MFA):

  • Cloud Platform enforces multi-factor authentication for remote access to enhance security.
  • The SSH key serves as one authentication factor, and a passphrase acts as the second factor, thereby reinforcing the authentication process.

4. Key Generation using ssh-keygen:

  • The ssh-keygen command-line utility is the go-to tool for generating SSH private/public key pairs.
  • Windows users are guided on installing and using either the Windows Subsystem for Linux (Windows 10) or Git for Windows (any Windows version) to access ssh-keygen.
  • Key generation involves running the command ssh-keygen -b 4096 to create a 4,096-bit key pair.

5. Passphrase Security:

  • Users are prompted to enter a passphrase during key generation, enhancing security.
  • The passphrase encrypts the private key, and users are cautioned to choose a unique, memorable text to prevent unauthorized access.

6. Key Management and Backup:

  • The article provides instructions for checking and backing up existing keys to prevent accidental overwrites.
  • Users are reminded to keep track of their passphrases as they are required whenever the key is used.

7. Key Copying and Cloud Platform Integration:

  • After key generation, the public key is copied to the Acquia user profile in Cloud Platform.
  • Platform-specific commands for macOS users (pbcopy) and generic methods for all operating systems are provided to copy the public key.

In conclusion, this article is a comprehensive guide, covering key aspects of SSH key pair generation, security considerations, and integration with Cloud Platform, all of which are crucial for a secure and compliant development environment.

Generating an SSH public key — Acquia Docs (2024)

FAQs

How to generate a SSH public key? ›

Generate an SSH Key Pair
  1. Run the ssh-keygen command. You can use the -t option to specify the type of key to create. ...
  2. The command prompts you to enter the path to the file in which you want to save the key. ...
  3. The command prompts you to enter a passphrase. ...
  4. When prompted, enter the passphrase again to confirm it.

How to add SSH key to acquia? ›

Add Ons
  1. On your local computer, use one of the following methods to copy your SSH public key file to the clipboard: ...
  2. Sign in to the Cloud Platform user interface.
  3. Click your user icon in the admin bar and click Account Settings.
  4. Click the SSH Keys tab. ...
  5. In the application pane, click Add SSH Keys.

How to generate SSH key GitLab? ›

How to setup GitLab SSH keys
  1. Generate a GitLab SSH key pair on your personal computer.
  2. Copy the value of the public SSH key.
  3. Log into GitLab and navigate to your account's Preferences tab.
  4. Click the 'Add new key' button in the SSH Keys tab.
  5. Paste the public key in as the value and set an expiration date.
Jan 30, 2024

How to generate SSH ed25519 public key? ›

Navigate to your .ssh directory:
  1. cd ~/.ssh.
  2. mkdir ~/.ssh cd ~/.ssh.
  3. ssh-keygen -t ed25519 Generating public/private ed25519 key pair. ...
  4. Enter file in which to save the key (/Users/username/.ssh/id_ed25519): id_username.
  5. Enter passphrase (empty for no passphrase): Enter same passphrase again:

How do I create my own public key? ›

To generate an SSH private/public key pair for your use, you can use the ssh-keygen command-line utility. You can run the ssh-keygen command from the command line to generate an SSH private/public key pair. If you are using Windows, by default you may not have access to the ssh-keygen command.

How to generate SSH key and copy? ›

Copy the ssh key into remote servers
  1. Open a terminal on your local computer.
  2. Generate an SSH key pair if you haven't already done so by running the command: ssh-keygen . ...
  3. Once the key pair is generated, run the command: ssh-copy-id user@remote_server . ...
  4. You'll be prompted to enter the password for the remote user account.
Apr 8, 2023

How to SSH into Acquia? ›

To use SSH to sign in as the website user, you must first register SSH public keys for your Acquia user profile, which provides a more secure method of signing in than using a password alone. You can add as many SSH keys as you want, each with their own nicknames to help you track them.

What is the public SSH key? ›

The SSH key pair is used to authenticate the identity of a user or process that wants to access a remote system using the SSH protocol. The public key is used by both the user and the remote server to encrypt messages. On the remote server side, it is saved in a public key file.

How to add SSH public key to a server? ›

Copying Public Keys to Remote Servers
  1. Copy the contents of the public key file, typically $HOME/. ssh/id_rsa. ...
  2. Ensure that the permissions of $HOME/. ssh and $HOME/. ...
  3. On the remote system, output the ~/.ssh/authorized_keys file: cat .ssh/authorized_keys.
  4. Note whether the key entry is included in the output.

How to generate SSH key shell? ›

Generate a Secure Shell (SSH) Public/Private Key Pair
  1. Navigate to your home directory: ...
  2. Run the ssh-keygen utility, providing as filename your choice of file name for the private key: ...
  3. Enter a passphrase for the private key, or press Enter to create a private key without a passphrase:

How to generate SSH key for remote host? ›

To generate an SSH key on your Linux server, run the command ssh-keygen . The command can take flags if you would like to customize the type of key that is generated and the signing algorithms that are used to generate the key. This example generates a standard 2048-bit RSA key without a passphrase.

How to generate SSH key to specific directory? ›

Creating SSH Keys (Terminal)
  1. Create an .ssh folder in the home directory. Create a .ssh folder in your user account's home directory if it doesn't already exist: $ mkdir /home/<user name>/.ssh. ...
  2. Use ssh-keygen to generate SSH key. ...
  3. Retrieve the public key file. ...
  4. Use the key in an async session.

How to generate open SSH key? ›

For Windows 10 & 11
  1. Press the Windows key or open up the Start Menu. Type “cmd”.
  2. Under “Best Match”, click “Command Prompt”.
  3. In the command prompt, use the ssh-keygen command: ...
  4. The system will now generate the key pair and display the key fingerprint and a randomart image. ...
  5. Open your file explorer.

How to create SSH public and private keys? ›

Procedure
  1. In a terminal, run the ssh-keygen command.
  2. Generate the public/private RSA key pair.
  3. Specify the directory in which to save the key pair. For example, /Users/mymac/. ssh/id_rsa... mysftpkey.
  4. Enter the passphrase. Then, enter the same passphrase again. Enter empty if you don't want to use a passphrase.

What is the ED25519 algorithm for SSH keys? ›

ED25519 Key Pair Type: An ED25519 key pair consists of a private key and a corresponding public key. The private key is used to generate digital signatures, while the public key is used to verify the signatures. The ED25519 algorithm is based on the elliptic curve defined over the prime field of 2²⁵⁵-19.

How to generate RSA key? ›

Generate RSA Keys
  1. Open a shell using Putty or another utility.
  2. Use commands to generate an RSA key file. Type the following command to generate RSA keys: ssh-keygen -t rsa. ...
  3. Navigate to the. rsakey. folder that you created in step 2b. ...
  4. Locate the public key beginning with. ssh. and copy the key.

How do I get a public SSH key from PuTTY? ›

Generating an SSH key pair using PuTTY
  1. Click Save public key. You are prompted for the name and location of the public key.
  2. Type icat. pub as the name of the public key and specify the location where you want to save the public key. ...
  3. Click Save.

Top Articles
Getting Started Guide – PowerShell.org
I owe money to friends or family. What happens if I can't pay them back?
Ffxiv Act Plugin
Lowe's Garden Fence Roll
Restored Republic January 20 2023
What spices do Germans cook with?
Sandrail Options and Accessories
Mcfarland Usa 123Movies
Kansas Craigslist Free Stuff
Arrests reported by Yuba County Sheriff
Buckaroo Blog
My Vidant Chart
Myql Loan Login
W303 Tarkov
Med First James City
Watch TV shows online - JustWatch
Gas Station Drive Thru Car Wash Near Me
Troy Athens Cheer Weebly
Funny Marco Birth Chart
Moonshiner Tyler Wood Net Worth
6813472639
Directions To 401 East Chestnut Street Louisville Kentucky
Wicked Local Plymouth Police Log 2022
Paychex Pricing And Fees (2024 Guide)
Saatva Memory Foam Hybrid mattress review 2024
TBM 910 | Turboprop Aircraft - DAHER TBM 960, TBM 910
UPS Store #5038, The
Accident On 215
Wemod Vampire Survivors
Providence Medical Group-West Hills Primary Care
Thick Ebony Trans
At 25 Years, Understanding The Longevity Of Craigslist
Costco Jobs San Diego
Jailfunds Send Message
Delete Verizon Cloud
San Jac Email Log In
Ryujinx Firmware 15
Craigslist/Phx
Bursar.okstate.edu
The Hoplite Revolution and the Rise of the Polis
Baddies Only .Tv
Metra Union Pacific West Schedule
Black Adam Showtimes Near Amc Deptford 8
In Polen und Tschechien droht Hochwasser - Brandenburg beobachtet Lage
Muziq Najm
How are you feeling? Vocabulary & expressions to answer this common question!
Infinite Campus Farmingdale
Appraisalport Com Dashboard Orders
How to Quickly Detect GI Stasis in Rabbits (and what to do about it) | The Bunny Lady
Smite Builds Season 9
Tommy Bahama Restaurant Bar & Store The Woodlands Menu
5103 Liberty Ave, North Bergen, NJ 07047 - MLS 240018284 - Coldwell Banker
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 5892

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.