lib/sconb.rb in sconb-0.0.7 vs lib/sconb.rb in sconb-1.0.0
- old
+ new
@@ -1,10 +1,9 @@
require "sconb/version"
require "thor"
require "net/ssh"
require "json"
-require "pp"
module Sconb
class CLI < Thor
method_option :all, :type => :boolean, :aliases => '-a', :default => false, :banner => 'dump .ssh/config and private keys.'
@@ -87,10 +86,10 @@
end
method_option :force, :type => :boolean, :aliases => '-f', :default => false, :banner => 'force generate'
desc "keyregen < dump.json", "Regenerate private keys from JSON"
def keyregen()
- json = $stdin.read
+ json = stdin_read
configs = JSON.parse(json)
configs.each do |host, config|
config.each do |key, value|
next unless key.downcase == 'identityfilecontent'
identity_files = config['IdentityFile']