• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How To Get SSH Public Key Fingerprint Information

June 3, 2013 by Sharad Chhetri Leave a Comment

Long time ago one of my U.S system admin was very security conscious. He asked me to create id_rsa.pub key in server. I created the key with ssh-keygen -t rsa command. And send it him through encrypted email. Next day he wrote me ,what is the ssh key fingerprint ?

First let’s have some introduction.

What is ssh public key fingerprint ?

Answer : In public-key cryptography, a public key fingerprint is a short sequence of bytes used to authenticate or look up a longer public key. Fingerprints are created by applying a cryptographic hash function to a public key. Since fingerprints are shorter than the keys they refer to, they can be used to simplify certain key management tasks.

It is very simple to find out the SSH public key fingerprint.

Command To Get Public Key Finger Print

Given below both file will show you same result.

ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
or 
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub

Here is the Output of above command.

ssh5

When you create a ssh key with the help of command “ssh-keygen -t rsa” or “ssh-keygen -t dsa” it has different fingerprint value . When you try to login with ssh key from other system it will ask you to accept the fingerprint value to add in known_hosts file ,the value exactly matches with ~/.ssh/id_rsa or ~/.ssh/id_rsa.pub file in your server.

To check fingerprint of ssh key

Use the given below command.

ssh-keygen -lf ~/.ssh/id_rsa
or
ssh-keygen -lf ~/.ssh/id_rsa.pub

This is the another good example of learning about fingerprint, the topic is “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED“. You might have seen this Warning Message when you do the SSH to Linux/Unix Machine. You will be able to relate both the posts. Happy SHSing.

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Agent admitted failure to sign using the key ssh
  2. type Command : Display Information About Command Type On Linux
  3. Non interactive ,without typing password do ssh to Server : By sshpass
  4. SSH WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED
  5. Change the default port number of ssh server
  6. How to install ssh server on Ubuntu
  7. RSA key authentication in Linux : Passwordless login
  8. error: Could not get shadow information for root
  9. how to deny root ssh access in linux server
  10. rsync over ssh port number on Linux/Unix system

Filed Under: Linux, Linux Commands, SSH, Tips And Tricks Tagged With: linux command, ssh

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

Error installing rails

Convert hyphen to underscore in between all filenames shell script

How to backup and restore iptables on Linux systems

How to find swap partition or file in linux

How to empty Trash through command line in Ubuntu

Agent admitted failure to sign using the key ssh

find command to search keyword in files recursively in linux

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy