Changes between Initial Version and Version 1 of SshFingerprints


Ignore:
Timestamp:
Sep 14, 2016, 1:10:55 PM (2 years ago)
Author:
chris
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SshFingerprints

    v1 v1  
     1Yoou can use this script to print the ssh private key fingerprints for a server:
     2
     3{{{
     4#!/usr/bin/env bash
     5
     6# check the ssh fingerpints for the server keys
     7# http://www.phcomp.co.uk/Tutorials/Unix-And-Linux/ssh-check-server-fingerprint.html
     8
     9# check that the script is being run by root
     10if [[ "$(id -u)" != "0" ]] ; then
     11  echo "You must run '$0' as root or via sudo"
     12  exit 1
     13fi
     14
     15for file in /etc/ssh/*_key.pub ; do
     16  ssh-keygen -lf $file
     17done
     18}}}
     19
     20This script is installed on [[Crin1]], [[Crin2]], [[Crin3]] and [[Crin4]] at `/usr/local/bin/ssh-private-key-fingerprints`