faq_hostkey » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
| faq_hostkey 2022-10-22 | faq_hostkey 2024-09-10 (current) | ||
| Line 1: | Line 1: | ||
| ====== Where do I get SSH host key fingerprint to authorize the server? ====== | ====== Where do I get SSH host key fingerprint to authorize the server? ====== | ||
| - | + | ===== Host key fingerprint is an integral part of session information ===== | |
| - | [03:05:39] Finger Print: 1d:c8:8c:7f:4a:73:25:b5:2b:7d:f1:a8:0d:ef:73:21 | + | You should get an SSH host key fingerprint along with your credentials from a server administrator. Knowing the host key fingerprint and thus [[ssh_verifying_the_host_key|being able to verify it]] is an integral part of securing an SSH connection. It prevents [[wp>Man-in-the-middle_attack|man-in-the-middle attacks]]. |
| ===== [[obtaining]] Safely obtaining host key ===== | ===== [[obtaining]] Safely obtaining host key ===== | ||
| Line 21: | Line 21: | ||
| You can also have the fingerprint displayed in an %%SSH%% terminal using ''[[https://man.openbsd.org/ssh-keygen|ssh-keygen]]'' command (on *nix servers that use OpenSSH server). For example: | You can also have the fingerprint displayed in an %%SSH%% terminal using ''[[https://man.openbsd.org/ssh-keygen|ssh-keygen]]'' command (on *nix servers that use OpenSSH server). For example: | ||
| - | <code> | + | <code bash> |
| - | ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key | + | ssh-keygen -l -f /etc/<nohilite>ssh</nohilite>/ssh_host_rsa_key |
| </code> | </code> | ||
| To display all available host keys, you can use: | To display all available host keys, you can use: | ||
| - | <code bash>for f in /etc/ssh/ssh_host_*_key; do ssh-keygen -l -f "$f"; done</code> | + | <code bash>for f in /etc/<nohilite>ssh</nohilite>/ssh_host_*_key; do ssh-keygen -l -f "$f"; done</code> |
| OpenSSH 6.8 and newer shows SHA-256 fingerprint by default. Older versions use MD5 fingerprint. | OpenSSH 6.8 and newer shows SHA-256 fingerprint by default. Older versions use MD5 fingerprint. | ||