added some utilities
externalip - returns the oneline plaintext well-formatted IP you face internet with ssh-fingerprint - echoes a SHA256 (default) or an MD5 (on request) fingerprint of the provided ssh key
This commit is contained in:
parent
b9bdf077a3
commit
69308f9550
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
curl http://ipecho.net/plain
|
||||
echo
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
md5=false
|
||||
key=""
|
||||
|
||||
# command-line parameters
|
||||
for prm in "$@"; do
|
||||
if [ "${prm:0:1}" == "-" ]; then
|
||||
if [ "$prm" == "-5" ] || [ "$prm" == "--md5" ]; then
|
||||
md5=true
|
||||
fi
|
||||
else
|
||||
key="$prm"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$key" == "" ]; then echo "Usage: $0 [ -5 | --md5 ] <key>"; exit 1; fi
|
||||
|
||||
if [ "$md5" == true ]; then
|
||||
ssh-keygen -E md5 -lf "$key"
|
||||
else
|
||||
ssh-keygen -lf "$key"
|
||||
fi
|
Loading…
Reference in New Issue