lk.mimuw.edu.pl
  • Laboratorium
    Regulamin Sale i sprzęt Ekrany w holu
  • Studenci
  • Pracownicy
  • Wi-Fi
  • Drukowanie
    Dla pracowników Dla studentów
  • Zamówienia publiczne
  • Praca zdalna
  • Helpdesk Instytutów
  • Szukaj
  • Kontakt
  • Poczta
    Poczta pracownicza Poczta studencka
  • PL EN
    Polski
Google Hangouts (wykłady, seminaria, etc.) Uniwersytecki Gitlab Wydziałowy Gitlab Dostęp do czasopism naukowych (proxy) Środowisko graficzne na serwerach i komputerach MIM SSH Zoom Fiori ERR SSH keys and Gitlab

SSH keys

Please consider whether you really need access to the shell. If you do, continue.

For Windows 10+, please see the excellent Purdue University tutorial.

  • This short and simple tutorial only covers the most basic case, when you do not have any SSH keys. If you already have an SSH key, you probably know what you are doing and are comfortable with adding and managing additional keys.
  • Please remember that the ssh-keygen will create two files. One is private and must be protected at all costs. Do not share it, do not show it to anyone. Keep it safe. Use a strong password when creating the key.
  • The second file will be public. You can print it on a t-shirt, send it via e-mail, expose it on your website.
  • Those two keys are cryptographically bound together. The public part will be copied to the Faculty's servers. When connecting to those servers, the ssh program will use your private key. The server will check, if those two keys match and will grant permission to enter if they do.

Create an SSH key


# ssh-keygen -t ed25519
Generating public/private ed25519 key pair.
Enter file in which to save the key (~/.ssh/id_ed25519):
Enter passphrase for "~/.ssh/id_ed25519" (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in id_ed25519
Your public key has been saved in id_ed25519.pub
The key fingerprint is:
SHA256:6+DetB4FrHiDoQ6h6zFuV1b2QbEUHox/dAgbpK1i6IE kamil@wilk
The key's randomart image is:
+--[ED25519 256]--+
|        +O+ .    |
|       o=o=o .   |
|.   .  .==. .    |
|.....+ +.+ .     |
|oE.ooo*.S +      |
| +. o+.. +       |
|.o..o . +        |
|o.o. . = o       |
|.o.  .o.=        |
+----[SHA256]-----+

The contents of the created public key are:


# cat ~/.ssh/id_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIV4NJw537MxsxqM9nuTnKy519vEKmT/AigGyf+Bs6ca

SSH keys and Gitlab

Adding a public SSH key to the Faculty's Gitlab instance can be accomplished in several easy steps.

  1. Select Preferences from the top-right menu (click on the user's icon).

    gitlabssh1

  2. Select SSH Keys from the menu on the left side of the page.

    gitlabssh2

  3. Click on the Add new keys button.

    gitlabssh3

  4. Paste the contents of the public part of the key to the text area (public part is the file with .pub extension). Optionally, remove the expiration date from the key (if you won't do this, you will have to rotate the key in the due date. This is not a bad thing.).

    gitlabssh4

  5. Remember to click the Add key button.

  6. If you have completed all the steps correctly, the key should be accessible from the internet at the following URL (replace login with your real login):


https://gitlab.mimuw.edu.pl/login.keys