From 83be2c10f11e8ba6c78d2afa2bc2e43ea68ba97c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 11 Jun 2013 11:19:37 -0300 Subject: Adding hydractl ssh-finger with argument support --- share/hydractl/ssh-finger | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/share/hydractl/ssh-finger b/share/hydractl/ssh-finger index edc5909..fac694b 100755 --- a/share/hydractl/ssh-finger +++ b/share/hydractl/ssh-finger @@ -22,9 +22,16 @@ hydra_config_load # Command line arguments BASENAME="`basename $0`" +HOST="$1" # Get the fingerprints -if [ -d "/etc/ssh" ]; then +if [ ! -z "$HOST" ]; then + if [ -f "/etc/ssh/ssh_known_hosts" ]; then + ssh-keygen -l -f /etc/ssh/ssh_known_hosts -F $HOST + fi + + ssh-keygen -l -f ~/.ssh/known_hosts -F $HOST +elif [ -d "/etc/ssh" ]; then for i in /etc/ssh/*.pub; do ssh-keygen -l -f $i done -- cgit v1.2.3