wenn ich folgende Kommandos auf dem Client ausführe
Code: Alles auswählen
file=$(mktemp)
ssh-keyscan server > $file
ssh-keygen -l -f $file
Code: Alles auswählen
file=$(mktemp)
ssh-keyscan localhost > $file
ssh-keygen -l -f $file
Viele Grüße,
Frink
Code: Alles auswählen
file=$(mktemp)
ssh-keyscan server > $file
ssh-keygen -l -f $file
Code: Alles auswählen
file=$(mktemp)
ssh-keyscan localhost > $file
ssh-keygen -l -f $file
Frink hat geschrieben:02.02.2018 15:58:33Mit welchen Befehlen, erhalte ich den Fingerprint einmal serverseitig und einmal clientseitig?
Code: Alles auswählen
server$ for f in /etc/ssh/ssh_host_*; do ssh-keygen -lf "$f"; done
client$ ssh-keygen -lF {host}
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.
—Bruce Schneier
Code: Alles auswählen
# for f in /etc/ssh/ssh_host_*; do ssh-keygen -lf "$f"; done
1024 fb:81:bc:36:94:cc:4e:1e:47:2e:2a:0b:5a:95:2c:68 /etc/ssh/ssh_host_dsa_key.pub (DSA)
1024 fb:81:bc:36:94:cc:4e:1e:47:2e:2a:0b:5a:95:2c:68 /etc/ssh/ssh_host_dsa_key.pub (DSA)
256 af:3a:b7:e0:6c:35:d8:d1:89:3c:38:ea:ee:ee:46:a2 /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA)
256 af:3a:b7:e0:6c:35:d8:d1:89:3c:38:ea:ee:ee:46:a2 /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA)
256 5e:94:ce:87:47:c2:97:55:42:ff:13:25:8c:5f:b6:21 /etc/ssh/ssh_host_ed25519_key.pub (ED25519)
256 5e:94:ce:87:47:c2:97:55:42:ff:13:25:8c:5f:b6:21 /etc/ssh/ssh_host_ed25519_key.pub (ED25519)
2048 79:cb:b2:f5:e9:1e:b3:95:a5:5e:4f:12:fc:fd:aa:0f root@raspberrypi (RSA1)
2048 79:cb:b2:f5:e9:1e:b3:95:a5:5e:4f:12:fc:fd:aa:0f root@raspberrypi (RSA1)
2048 66:ef:69:ec:3c:5f:9c:8b:61:cb:67:c2:4d:9c:3d:a7 /etc/ssh/ssh_host_rsa_key.pub (RSA)
2048 66:ef:69:ec:3c:5f:9c:8b:61:cb:67:c2:4d:9c:3d:a7 /etc/ssh/ssh_host_rsa_key.pub (RSA)
Code: Alles auswählen
$ ssh-keygen -lF raspberrypi
# Host raspberrypi found: line 52
raspberrypi ECDSA SHA256:aW+uffHTaKCCRCCjHG29wjLbuWKhqzrit5ErOrG4Qk8
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.
—Bruce Schneier
Code: Alles auswählen
#!/bin/bash
(echo -e "filename\tkeylength\tmd5-fingerprint\tcomment\tkeytype"
for i in /etc/ssh/*host*key ; do
echo -en "$(basename $i)\t"
ssh-keygen -E md5 -lf $i
done)|sed 's|MD5:||'|column -t
Code: Alles auswählen
$ sudo ./hostKey-print
filename keylength md5-fingerprint comment keytype
ssh_host_ecdsa_key 256 11:ac:e3:40:54:4a:bc:49:8d:26:49:97:65:4b:c2:80 root@mobi (ECDSA)
ssh_host_ed25519_key 256 97:82:e8:4f:d3:e9:b6:96:65:3f:f7:d2:bf:17:5c:84 root@mobi (ED25519)
ssh_host_rsa_key 2048 74:51:9c:78:49:91:50:25:5e:46:ef:69:6f:c4:61:57 root@mobi (RSA)