Docker-Docs/_includes/content/ssh/ssh-gen-keys.md

2.8 KiB

  • Mac
  • Windows
  • Linux

{% capture mac-content-gen %} 1. Open a command-line terminal.
  1. Paste the text below, substituting in your GitHub email address.

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    

    This creates a new SSH key, using the provided email as a label.

    Generating public/private rsa key pair.
    
  2. When prompted with "Enter a file in which to save the key", press the Return key (Enter) to accept the default location.

    Enter a file in which to save the key (/Users/you/.ssh/id_rsa):
    
  3. At the prompt, type a secure passphrase, and re-enter as prompted.

    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    

{% endcapture %} {{ mac-content-gen | markdownify }}



{% capture win-content-gen %} 1. Open Git Bash.
  1. Paste the text below, substituting in your GitHub email address.

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    

    This creates a new SSH key, using the provided email as a label.

    Generating public/private rsa key pair.
    
  2. When prompted with "Enter a file in which to save the key", press the Return key (Enter) to accept the default location.

    Enter a file in which to save the key (c/Users/you/.ssh/id_rsa):
    
  3. At the prompt, type a secure passphrase, and re-enter as prompted.

    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    

{% endcapture %} {{ win-content-gen | markdownify }}



{% capture linux-content-gen %} 1. Open a command-line terminal.
  1. Paste the text below, substituting in your GitHub email address.

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    

    This creates a new SSH key, using the provided email as a label.

    Generating public/private rsa key pair.
    
  2. When prompted with "Enter a file in which to save the key", press the Return key (Enter) to accept the default location.

    Enter a file in which to save the key (/home/you/.ssh/id_rsa):
    
  3. At the prompt, type a secure passphrase, and re-enter as prompted.

    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    

{% endcapture %} {{ linux-content-gen | markdownify }}