 
 util = require 'util'
+each = require 'each'
 multimatch = require 'multimatch'
 connect = require 'ssh2-connect'
 exec = require 'ssh2-exec'

        util.print "\x1b[35m#{stderr.trim()}\x1b[39m\n" if stderr.length
        util.print "\n"
        ssh.end()

params = params.parse()

module.exports = ->
  each config.servers
  .parallel true
  .on 'item', (server, next) ->
    return next() if params.hosts? and multimatch(server.host, params.hosts).indexOf(server.host) is -1
    connection = merge {}, config.connection, server.connection
    connection.username ?= 'root'
    connection.host ?= connection.ip or server.ip or server.host
