Update SSH Keys at JSC Supercomputers authored by Johannes Keller's avatar Johannes Keller
Contents
[TOC]
JSC provides thorough [instructions](https://apps.fz-juelich.de/jsc/hps/jureca/access.html#openssh-key-generation) on how to generate and upload the SSH keys. For convenience, below you will find a quick recipe to achieve this. JSC provides thorough [instructions](https://apps.fz-juelich.de/jsc/hps/jureca/access.html#openssh-key-generation) on how to generate and upload the SSH keys. For convenience, below you will find a quick recipe to achieve this.
Logging in to our systems is usually done through the Secure Shell (SSH) mechanism, although there are alternatives such as UNICORE and JupyterLab. Our SSH configuration uses an authentication mechanism based on public and private keys rather than passwords. A pair of public and private keys has to be generated on your personal computer. The private key has to be protected by a passphrase. The public key is then registered for access to the system through JuDoor. Logging in to our systems is usually done through the Secure Shell (SSH) mechanism, although there are alternatives such as UNICORE and JupyterLab. Our SSH configuration uses an authentication mechanism based on public and private keys rather than passwords. A pair of public and private keys has to be generated on your personal computer. The private key has to be protected by a passphrase. The public key is then registered for access to the system through JuDoor.
...@@ -11,7 +15,7 @@ Several software packages can be used for logging in through SSH. In the followi ...@@ -11,7 +15,7 @@ Several software packages can be used for logging in through SSH. In the followi
- [PuTTY](https://www.putty.org/ ) - a popular choice on Windows - [PuTTY](https://www.putty.org/ ) - a popular choice on Windows
### 1.1. Generating a key pair with OpenSSH ### Generating a key pair with OpenSSH
First, open a terminal e.g. by pressing the `ctrl`\+`alt`\+`t` keys. First, open a terminal e.g. by pressing the `ctrl`\+`alt`\+`t` keys.
Then, run the following command: Then, run the following command:
...@@ -22,7 +26,7 @@ Then, run the following command: ...@@ -22,7 +26,7 @@ Then, run the following command:
This will require a **passphrase** to be created. This is your passphrase to log in to JURECA-DC. This passphrase is associated with the key you have created (i.e., it allows for the key to be used). This will require a **passphrase** to be created. This is your passphrase to log in to JURECA-DC. This passphrase is associated with the key you have created (i.e., it allows for the key to be used).
If the designated output file (~/.ssh/id_ed25519) already exists, the program asks to overwrite it. This is probably not what you want, since you might be using the key contained therein. Change the output name by using the arguments `-f ~/.ssh/id_ed25519_jsc` instead of `-f ~/.ssh/id_ed25519`. If you do so, keep in mind that your keys are in a non-default location for the remainder of the course. If the designated output file (`~/.ssh/id_ed25519`) already exists, the program asks to overwrite it. This is probably not what you want, since you might be using the key contained therein. Change the output name by using the arguments `-f ~/.ssh/id_ed25519_jsc` instead of `-f ~/.ssh/id_ed25519`. If you do so, keep in mind that your keys are in a non-default location for the remainder of the course.
Print the contents of the public key to the terminal by entering: Print the contents of the public key to the terminal by entering:
`cat ~/.ssh/id_ed25519.pub` `cat ~/.ssh/id_ed25519.pub`
...@@ -33,7 +37,7 @@ and copy it to the clipboard. **Do not copy the key above!** This is only an exa ...@@ -33,7 +37,7 @@ and copy it to the clipboard. **Do not copy the key above!** This is only an exa
Next, go to the section “2. Uploading the public key to JuDoor” Next, go to the section “2. Uploading the public key to JuDoor”
### 1.2 Generating a key pair with PuTTY ### Generating a key pair with PuTTY
Open `puttygen.exe` to generate a key pair. Select `_Ed25519_` as the key type then click `_Generate_` and follow the instructions of the program. Once the key has been generated, enter a strong passphrase that cannot be guessed easily. This passphrase is used to encrypt the key while it is stored on disk so that it cannot be used if it is stolen. Open `puttygen.exe` to generate a key pair. Select `_Ed25519_` as the key type then click `_Generate_` and follow the instructions of the program. Once the key has been generated, enter a strong passphrase that cannot be guessed easily. This passphrase is used to encrypt the key while it is stored on disk so that it cannot be used if it is stolen.
...@@ -44,7 +48,7 @@ Now, copy the contents of the field `_Public key for pasting into OpenSSH author ...@@ -44,7 +48,7 @@ Now, copy the contents of the field `_Public key for pasting into OpenSSH author
Next, go to the section “2. Uploading the public key to JuDoor” Next, go to the section “2. Uploading the public key to JuDoor”
## 2. Uploading the public key pair to JuDoor ## Uploading the public key pair to JuDoor
Log in to [JuDoor account](https://judoor.fz-juelich.de/login) with your JSC account. Log in to [JuDoor account](https://judoor.fz-juelich.de/login) with your JSC account.
Navigate to JuDoor and click on "_Manage SSH-keys_" next to the entry for the system you want to use under the Systems heading. For this workshop, we will use “**jureca**”. If you are not able to see **jureca**, it means you still have not requested (or been granted) access to this system. Navigate to JuDoor and click on "_Manage SSH-keys_" next to the entry for the system you want to use under the Systems heading. For this workshop, we will use “**jureca**”. If you are not able to see **jureca**, it means you still have not requested (or been granted) access to this system.
... ...
......