Authentifizierung mit Schlüssel: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 25: | Zeile 25: | ||
=SSH private Key im Nachhinein mit Passwort sichern= | =SSH private Key im Nachhinein mit Passwort sichern= | ||
*ssh-keygen -p -f ~/.ssh/id_rsa | *ssh-keygen -p -f ~/.ssh/id_rsa | ||
| + | =Key zum Agent hinzufügen= | ||
| + | *ssh-add | ||
| + | Enter passphrase for /home/thomas.will/.ssh/id_rsa: | ||
| + | Identity added: /home/thomas.will/.ssh/id_rsa (thomas.will@krill.xinux.de) | ||
Version vom 21. Oktober 2021, 09:18 Uhr
Schlüsselpaar erstellen
- Man sollte hier ein Passwort eingeben. Nur so ist sichergestellt, das bei einem Verlust des Schlüssels ein Angreifer sich nicht einlogen kann.
- ssh-keygen
Generating public/private rsa key pair. Enter file in which to save the key (/home/xinux/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/xinux/.ssh/id_rsa. Your public key has been saved in /home/xinux/.ssh/id_rsa.pub. The key fingerprint is: a7:13:ec:54:a3:4f:29:32:f8:98:04:ea:0c:b9:62:04 xinux@zero The key's randomart image is: +--[ RSA 2048]----+ | | | | |E . o | |.o . . . o o | |+. o o S + | |=. . + = B | |o+ o . + . | |o . | | | +-----------------+ xinux@zero:~$
SSH private Key im Nachhinein mit Passwort sichern
- ssh-keygen -p -f ~/.ssh/id_rsa
Key zum Agent hinzufügen
- ssh-add
Enter passphrase for /home/thomas.will/.ssh/id_rsa: Identity added: /home/thomas.will/.ssh/id_rsa (thomas.will@krill.xinux.de)