SSH, mostrando las claves en una máquina y viendo las claves con SSH

From Wiki de Caballero
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Para mostrar las claves de forma fácil:

for i in $(ls /etc/ssh/*sa_key.pub); do ssh-keygen -l -f $i; done

Se puede ejecutar lo siguiente (ver script en GitHub):

curl -sS https://raw.githubusercontent.com/caballerofelipe/scripts/master/ssh/ssh_fingerprint.sh | bash

Lo que genera un resultado parecido al siguiente:

+---------+---------+-----------------------------------------------------+
| Cipher  | Algo    | Fingerprint                                         |
+---------+---------+-----------------------------------------------------+
| RSA     | MD5     | MD5:15:66:80:fd:79:d8:c0:92:e8:39:4a:bc:4e:c4:00:15 |
| RSA     | SHA-256 | SHA256:G+rKuLGk+8Z1oxUV3cox0baNsH0qGQWm/saWPr4qZMM  |
+---------+---------+-----------------------------------------------------+
| ECDSA   | MD5     | MD5:f5:90:5c:03:2e:38:1b:c9:86:bd:86:47:5d:22:79:17 |
| ECDSA   | SHA-256 | SHA256:GGmuOzsG4EGeRV9KD1WK7tRf3nIc40k/5jRgbTZDpTo  |
+---------+---------+-----------------------------------------------------+
| ED25519 | MD5     | MD5:d1:5a:04:56:37:f4:75:19:22:e6:e5:d7:41:fd:79:fa |
| ED25519 | SHA-256 | SHA256:QVdqYeVzvsP4n5yjuN3D2fu8hDhskOxQCQAV5f9QK7w  |
+---------+---------+-----------------------------------------------------+