diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-06-11 11:19:37 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-06-11 11:19:37 -0300 |
commit | 83be2c10f11e8ba6c78d2afa2bc2e43ea68ba97c (patch) | |
tree | 41f60d8b14c90f841ab71788e2790e03fa81a0fb /share | |
parent | fb247bc26059b958d56eaecc7f5df5458b85228f (diff) | |
download | hydra-83be2c10f11e8ba6c78d2afa2bc2e43ea68ba97c.tar.gz hydra-83be2c10f11e8ba6c78d2afa2bc2e43ea68ba97c.tar.bz2 |
Adding hydractl ssh-finger with argument support
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydractl/ssh-finger | 9 |
1 files changed, 8 insertions, 1 deletions
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 |