Skip to content
Snippets Groups Projects
Commit 3ddbd41e authored by Lukas Kluft's avatar Lukas Kluft
Browse files

Merge branch 'command-line-additions' into 'main'

Command line additions

See merge request generic-software-skills/lecture-materials!36
parents f76fa496 3ef35765
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,7 @@ Different ways to work on a cluster depending on the task:
```{raw}
ssh a123456@levante.dkrz.de
```
(use your user id instead of a123456)
* Now you have access to the command line on levante
## Public keys
......@@ -116,13 +117,13 @@ Different ways to work on a cluster depending on the task:
## Generating SSH keys
* Generate an ssh key pair
```{raw}
* Generate a private / public ssh key pair for authentication on your local system
```bash
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_levante
```
* Upload the public (`.pub`) key to your [DKRZ profile](https://luv.dkrz.de)
* Use your ssh key instead of your password when connecting to levante
```{raw}
* Upload the public (`.pub`) key to your [DKRZ profile](https://luv.dkrz.de) ([instructions](https://docs.dkrz.de/doc/levante/access-and-environment.html)), so levante can check your connection attempts
* Use your private ssh key instead of your password when connecting to levante
```bash
ssh -i ~/.ssh/id_ed25519_levante a123456@levante.dkrz.de
```
......@@ -130,11 +131,12 @@ Different ways to work on a cluster depending on the task:
* Create a config file for convenience
```{.sshconfig filename=~/.ssh/config}
Host levante
Hostname levante.dkrz.de
User a123456
IdentityFile ~/.ssh/id_ed25519_levante
Host levante # the name you use in the shell
Hostname levante.dkrz.de # the official name of the system
User a123456 # your user id
IdentityFile ~/.ssh/id_ed25519_levante # your private key
```
(call `man ssh_config` for more info)
* The connection to levante simplifies to
```{raw}
......@@ -239,3 +241,8 @@ You can use X-forwarding to forward graphical user interfaces (GUIs) from the se
* SSH keys at DKRZ expire after a month
* When using a hardware authenticators (e.g. YubiKey) the key is valid for a year
# References
* [Software Carpentry: The Unix Shell](https://swcarpentry.github.io/shell-novice/)
* [Software Carpentry Incubator: Unix Shell Extras (incl. ssh)](https://carpentries-incubator.github.io/shell-extras/)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment