From 01f2020f2493f4fd7293b6297146945c4edef61d Mon Sep 17 00:00:00 2001 From: Kevin Sandi Date: Wed, 7 Sep 2022 17:30:34 -0600 Subject: [PATCH] Docs: fix enumeration and indentation Signed-off-by: Kevin Sandi Change-Id: Iab7ca1d3dc61dfd07467008ce77c3f6ba5f4f53b --- docs/ssh.rst | 99 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 52 insertions(+), 47 deletions(-) diff --git a/docs/ssh.rst b/docs/ssh.rst index 8a74b1a..bdf2f00 100644 --- a/docs/ssh.rst +++ b/docs/ssh.rst @@ -8,9 +8,10 @@ SSH Guide Ssh-keygen is a tool for creating new authentication key pairs for SSH, which is then used for automating logins, single sign-on, and for authenticating hosts. Creating a SSH key on Windows ------------------------------ +============================= -#. Check for existing SSH keys +1. Check for existing SSH keys +------------------------------ You can use an existing key if you'd like, but creating a new key per service is a good security practice. @@ -18,7 +19,7 @@ You can use an existing key if you'd like, but creating a new key per service is .. code-block:: bash - cd %userprofile%/.ssh + cd %userprofile%/.ssh If you see "No such file or directory", then there aren't any existing keys and you'll need to create a new one. Go to `Generate a new SSh key`._ @@ -26,11 +27,12 @@ You can use an existing key if you'd like, but creating a new key per service is .. code-block:: bash - dir id_* + dir id_* If there are existing keys, you may want to use those. -#. Back up old SSH keys +2. Back up old SSH keys +----------------------- If you have existing SSH keys, but you don't want to use them when connecting to remote Server, you should back those up. @@ -38,52 +40,53 @@ If you have existing SSH keys, but you don't want to use them when connecting to .. code-block:: bash - mkdir key_backup - copy id_rsa* key_backup + mkdir key_backup + copy id_rsa* key_backup -#. Generate a new SSH key +3. Generate a new SSH key +------------------------- If you don't have an existing SSH key that you wish to use, generate one as follows: - #. Log in to your local computer as your user. - #. In a command prompt, run: + 1. Log in to your local computer as your user. + 2. In a command prompt, run: - .. code-block:: bash + .. code-block:: bash - ssh-keygen -t rsa -b 4096 -C "your_email@example.com" + ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - Associating the key with your email address helps you to identify the key later on. + Associating the key with your email address helps you to identify the key later on. - Note that the ssh-keygen command is present and available if you have already installed Git (with Git Bash). + Note that the ssh-keygen command is present and available if you have already installed Git (with Git Bash). - You'll see a response like this: + You'll see a response like this: - .. image:: _static/ssh-keygen_1.png - :alt: ssh-keygen_1. - :align: center + .. image:: _static/ssh-keygen_1.png + :alt: ssh-keygen_1. + :align: center -#. Enter, and re-enter, a passphrase when prompted. The whole interaction will look like this: + 3. Enter, and re-enter, a passphrase when prompted. The whole interaction will look like this: - .. image:: _static/ssh-keygen_2.png - :alt: ssh-keygen_2. - :align: center + .. image:: _static/ssh-keygen_2.png + :alt: ssh-keygen_2. + :align: center -#. You're done! + 4. You're done! Creating an SSH key on Linux & macOS ------------------------------------- +==================================== -#. Check for existing SSH keys +1. Check for existing SSH keys +------------------------------ You can use an existing key if you'd like, but creating a new key per service is a good security practice. - Open a terminal and run the following: .. code-block:: bash - cd ~/.ssh + cd ~/.ssh If you see "No such file or directory", then there aren't any existing keys and you'll need to create a new one. Go to `Generate a new SSH key`._ you can also refer to https://docs.github.com/en/enterprise/2.16/user/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent. @@ -91,11 +94,12 @@ You can use an existing key if you'd like, but creating a new key per service is .. code-block:: bash - ls id_* + ls id_* If there are existing keys, you may want to use those. -#. Back up old SSH keys +2. Back up old SSH keys +----------------------- If you have existing SSH keys, but you don't want to use them when connecting to Bitbucket Server, you should back those up. @@ -103,34 +107,35 @@ If you have existing SSH keys, but you don't want to use them when connecting to .. code-block:: bash - mkdir key_backup - mv id_rsa* key_backup + mkdir key_backup + mv id_rsa* key_backup -#. Generate a new SSH key +3. Generate a new SSH key +------------------------- If you don't have an existing SSH key that you wish to use, generate one as follows: - #. Open a terminal on your local computer and enter the following: + 1. Open a terminal on your local computer and enter the following: - .. code-block:: bash + .. code-block:: bash - ssh-keygen -t rsa -b 4096 -C "your_email@example.com" + ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - Associating the key with your email address helps you to identify the key later on. + Associating the key with your email address helps you to identify the key later on. - You'll see a response like this: + You'll see a response like this: - .. image:: _static/ssh-keygen_3.png - :alt: ssh-keygen_3. - :align: center + .. image:: _static/ssh-keygen_3.png + :alt: ssh-keygen_3. + :align: center -#. Press to accept the default location and file name. If the .ssh directory doesn't exist, the system creates one for you. + 2. Press to accept the default location and file name. If the .ssh directory doesn't exist, the system creates one for you. -#. Enter, and re-enter, a passphrase when prompted. - The whole interaction will look like this: + 3. Enter, and re-enter, a passphrase when prompted. + The whole interaction will look like this: - .. image:: _static/ssh-keygen_4.png - :alt: ssh-keygen_4. - :align: center + .. image:: _static/ssh-keygen_4.png + :alt: ssh-keygen_4. + :align: center -#. You're done! + 4. You're done! -- 2.16.6