diff options
Diffstat (limited to 'bin/list-ssh-authorized-keys')
-rwxr-xr-x | bin/list-ssh-authorized-keys | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/bin/list-ssh-authorized-keys b/bin/list-ssh-authorized-keys deleted file mode 100755 index 0722b4f..0000000 --- a/bin/list-ssh-authorized-keys +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env ruby -# Usage: list-ssh-authorized-keys [username] -cfg_hackers="hackers.yml" -cfg_groups = [ "hackers", "bots" ] - -###################################################################### - -require 'yaml' - -users = YAML::load(open(cfg_hackers)) - -if ARGV[0] - users = users.find_all{|u|u["username"] == ARGV[0]} -else - users = users.find_all{|u|u["groups"] and not (u["groups"] & cfg_groups).empty?} -end - -users.each do |user| - if user["ssh_keys"] - user["ssh_keys"].each do |addr,key| - puts "#{key} #{user["fullname"]} (#{user["username"]}) <#{addr}>" - end - end -end |