
J'ai besoin d'un éclaircissement au sujet de ce qui est nommé "fingerprint" pour les clés SSH.
Car si je génère une clé :
Code : Tout sélectionner
$ ssh-keygen -t ed25519 -f ./test_ed25519
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./test_ed25519
Your public key has been saved in ./test_ed25519.pub
The key fingerprint is:
SHA256:pXTZoAyCYVF+G6lo4DF4FMGYSbQyLq2SbT+b3g4qhac toto@local-system
The key's randomart image is:
+--[ED25519 256]--+
|oBBBo . . |
|=o+. . + . + |
|=+. . + + + . |
|+=o. o + + |
|.++ . . S |
|o=o |
|++o . |
|E. o.+ |
| ...=+o |
+----[SHA256]-----+
Code : Tout sélectionner
$ cat ./test_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN7SpqRHNaQWRNd32th/MNneW6mP7rYQZY+JbfxGQvFk toto@local-system
puis j'envoie (???) de ma clé publique sur le serveur (distant)
Code : Tout sélectionner
$ ssh-copy-id -i ./test_ed25519.pub root@ip_server
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "./test_ed25519.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@ip_server's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'root@ip_server'"
and check to make sure that only the key(s) you wanted were added.
ce qui donne sur le serveur
Code : Tout sélectionner
root@server:~/.ssh# cat authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN7SpqRHNaQWRNd32th/MNneW6mP7rYQZY+JbfxGQvFk toto@local-system
Mon interrogation est au sujet du distingo à faire entre :
AAAAC3NzaC1lZDI1NTE5AAAAIN7SpqRHNaQWRNd32th/MNneW6mP7rYQZY+JbfxGQvFk
Code : Tout sélectionner
$ cat ./test_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN7SpqRHNaQWRNd32th/MNneW6mP7rYQZY+JbfxGQvFk toto@local-system
et
pXTZoAyCYVF+G6lo4DF4FMGYSbQyLq2SbT+b3g4qhac
Code : Tout sélectionner
The key fingerprint is:
SHA256:pXTZoAyCYVF+G6lo4DF4FMGYSbQyLq2SbT+b3g4qhac toto@local-system
Code : Tout sélectionner
The key's randomart image is:
+--[ED25519 256]--+
|oBBBo . . |
|=o+. . + . + |
|=+. . + + + . |
|+=o. o + + |
|.++ . . S |
|o=o |
|++o . |
|E. o.+ |
| ...=+o |
+----[SHA256]-----+
Mais à part créer de la confusion,
je ne comprends pas l'utilité de cette empreinte "SHA256" :
Code : Tout sélectionner
The key fingerprint is:
SHA256:pXTZoAyCYVF+G6lo4DF4FMGYSbQyLq2SbT+b3g4qhac toto@local-system
Merci.