Inhalt |
---|
This page aims to provide you with a step-by-step guide on how to use public key authentication to connect to the HLRN.
Summary
- Create an SSH keypair key pair with a passphrase that is not used anywhere else.
- Upload the public key on our Service Portal.
- Specify your new private key when connecting to our frontends (either via via
ssh -i <yourkey>
or in your ssh config).
Step-by-step guide
An SSH key pair consists of a public key and a private key. The public key is used to encrypt messages. Such messages can only be decrypted by the corresponding private key. The private key must be stored safely on the local machine - protected by a passphrase, and not accessible for other users.
SSH Key Generation
Generating your key pair differs depending on the SSH implementation. The default for Linux and MacOS is OpenSSH. This is also available (without extra installation) in more recent versions of Windows.
...
Kein Format |
---|
$ ssh -i $HOME/.ssh/id_rsa_hlrn -l your_username blogin.hlrn.de Enter passphrase for key '/<home_directory>/.ssh/id_rsa_hlrn': [...] |
Use Alternatively, use the SSH configuration file $HOME/.ssh/config
on your local machine to permanently store options for specific SSH connections , so that they can be omitted on the command line.
For example, by adding the following to your local $HOME/.ssh/config
:
Kein Format |
---|
Host blogin Hostname blogin.hlrn.de IdentityFile ~/.ssh/id_rsa_hlrn User your_username |
Now the ssh command will automatically choose the proper credentials in the future, i. e., -l your_username
and -i <private_key>
can be omitted from the command line , so that that ssh blogin
is sufficient.
...