diff options
author | Vinod Ahuja <vahuja@unomaha.edu> | 2022-09-29 16:42:41 -0500 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2022-10-04 15:10:11 +0000 |
commit | 9194788f0b023a59c9246ae030b3a35b0d79f5c6 (patch) | |
tree | 77424d35a96c274ea47f6c8818aa6dc6ca530530 | |
parent | 93d61c56cc3ca37384575398718f87222e36012a (diff) |
Fixing SSH key generation problemlamprey_12.1.9lamprey_12.1.8lamprey_12.1.7lamprey_12.1.20lamprey_12.1.19lamprey_12.1.18lamprey_12.1.17lamprey_12.1.16lamprey_12.1.15lamprey_12.1.14lamprey_12.1.13lamprey_12.1.12lamprey_12.1.11lamprey/12.1.9lamprey/12.1.8lamprey/12.1.7lamprey/12.1.20lamprey/12.1.19lamprey/12.1.18lamprey/12.1.17lamprey/12.1.16lamprey/12.1.15lamprey/12.1.14lamprey/12.1.13lamprey/12.1.12lamprey/12.1.1112.1.912.1.812.1.712.1.2012.1.1912.1.1812.1.1712.1.1612.1.1512.1.1412.1.1312.1.1212.1.11lamprey
I installed Ubuntu 22.04 and RSA protocol for ssh key pair was not working and was constantly getting permission denined key pair mismatch issues.
After following openstac documentation (https://docs.openstack.org/contributors/common/setup-gerrit.html) I was quickly able to fix SSH key setup issue.
Open Stack recommended to use ed25519 keys protocol as it works well in all operating system.
Following that recommendation and personally experience issues with RSA key generation I have updated the documentation to ed25519.
Bug-AGL: [SPEC-4470]
Signed-off-by: Vinod Ahuja <vahuja@unomaha.edu>
Change-Id: I6209337e0056821ec9a0f28ea9aabb9d0933c53e
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/documentation/+/27932
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
-rw-r--r-- | docs/6_How_To_Contribute/1_Getting_Linux_Foundation_account.md | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/docs/6_How_To_Contribute/1_Getting_Linux_Foundation_account.md b/docs/6_How_To_Contribute/1_Getting_Linux_Foundation_account.md index c4d8b08..f2b2cb7 100644 --- a/docs/6_How_To_Contribute/1_Getting_Linux_Foundation_account.md +++ b/docs/6_How_To_Contribute/1_Getting_Linux_Foundation_account.md @@ -40,22 +40,23 @@ What follows explains how to generate an SSH key pair in a Linux environment --- follow the equivalent steps on your OS. First, create an SSH key pair with the command: +**Note:** This guide recommends using ed25519 keys because it has been found that this type works well across all operating systems. ```sh - $ ssh-keygen -t rsa -C "John Doe john.doe@example.com" + $ ssh-keygen -t ed25519 -C "your_name@example.com" ``` -**Note:** This will ask you for a password to protect the private key as +**Note:** When you’re prompted to “Enter a file in which to save the key” press Enter. This accepts the default location. Next, it will ask you for a password to protect the private key as it generates a unique key. Please keep this password private, and DO NOT enter a blank password. -The generated SSH key pair can be found in the files ``~/.ssh/id_rsa`` and -``~/.ssh/id_rsa.pub``. +The generated SSH key pair can be found in the files ``~/.ssh/id_ed25519`` and +``~/.ssh/id_ed25519.pub``. -Next, add the private key in the ``id_rsa`` file to your key ring, e.g.: +Next, add the private key in the ``id_ed25519`` file to your key ring, e.g.: ```sh - $ ssh-add ~/.ssh/id_rsa + $ ssh-add ~/.ssh/id_ed25519 ``` Finally, add the public key of the generated key pair to the Gerrit @@ -69,12 +70,10 @@ server, with the following steps: 4. On the left side menu, click on ``SSH Public Keys``. -5. Paste the contents of your public key ``~/.ssh/id_rsa.pub`` and click +5. Paste the contents of your public key ``~/.ssh/id_ed25519.pub`` and click ``Add key``. -**Note:** The ``id_rsa.pub`` file can be opened with any text editor. -Ensure that all the contents of the file are selected, copied and pasted -into the ``Add SSH key`` window in Gerrit. +**Note:** The ``id_ed25519.pub`` file can be opened with any text editor or you can run the command ``cat ~/.ssh/id_ed25519.pub`` in your terminal and copy output. Ensure that all the contents of the file are selected, copied and pasted into the ``Add SSH key`` window in Gerrit. **Note:** The SSH key generation instructions operate on the assumption that you are using the default naming. It is possible to generate @@ -82,19 +81,18 @@ multiple SSH keys and to name the resulting files differently. See the [ssh-keygen](https://en.wikipedia.org/wiki/Ssh-keygen) documentation for details on how to do that. Once you have generated non-default keys, you need to configure SSH to use the correct key for Gerrit. In that case, -you need to create a ``~/.ssh/config`` file modeled after the one below. +you need to create a ``~/.ssh/config`` file with command ``touch ~/.ssh/config`` and add details in config file. - ```sh +``` host gerrit.automotivelinux.org HostName gerrit.automotivelinux.org - IdentityFile ~/.ssh/id_rsa_automotivelinux_gerrit + IdentityFile ~/.ssh/id_ed25519 User <LFID> + Port 29418 ``` -`<LFID>` is your Linux Foundation ID and the value of IdentityFile is the +`<LFID>` is your Linux Foundation ID(username) and the value of IdentityFile is the name of the public key file you generated. **Warning:** Potential Security Risk! Do not copy your private key -``~/.ssh/id_rsa``. Use only the public ``~/.ssh/id_rsa.pub``. - - +``~/.ssh/id_ed25519``. Use only the public ``~/.ssh/id_ed25519.pub``. |