From ac4dcb64a8f6c07dfe50e9005dc4246f21ebf84e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 6 Sep 2014 00:39:14 -0400 Subject: Split hackers.yml into users/#{uid}.yml --- bin/list-ssh-authorized-keys | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 bin/list-ssh-authorized-keys (limited to 'bin/list-ssh-authorized-keys') 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 -- cgit v1.2.3-2-g168b