SSH ohne Passwort: Unterschied zwischen den Versionen

Aus MattWiki
(Die Seite wurde neu angelegt: „=== Schlüssel erstellen === $ ssh-keygen Ergebnis: Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa):…“)
 
Keine Bearbeitungszusammenfassung
Zeile 37: Zeile 37:


  $ less ~/.ssh/authorized_keys
  $ less ~/.ssh/authorized_keys
[[Category:Debian]]
[[Category:Kryptographie]]

Version vom 24. Mai 2015, 00:37 Uhr

Schlüssel erstellen

$ ssh-keygen

Ergebnis:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
b2:ad:a0:80:85:ad:6c:16:bd:1c:e7:63:4f:a0:00:15 user@host
The key's randomart image is:
+--[ RSA 2048]----+
|  E.             |
| .               |
|.                |
|.o.              |
|.ooo o. S        |
|oo+ * .+         |
|++ +.+...        |
|o. ...+.         |
|  .   ..         |
+-----------------+

Schlüssel zum remote Host kopieren

$ ssh-copy-id user@remotehost.tld

Einloggen ausprobieren

$ ssh user@remotehost.tld

Überprüfen, welche Schlüssel hinterlegt sind, um auszuschließen, dass weitere Schlüssel Zugriff haben:

$ less ~/.ssh/authorized_keys