Sha256: 91de7167993081ebea9d271afab1d7bc8b9dd98a8d7c7b338c66c0f4cae9528f

Contents?: true

Size: 507 Bytes

Versions: 1

Compression:

Stored size: 507 Bytes

Contents

require 'albacore/support/albacore_helper'
require 'net/ssh'

class Ssh
	include YAMLConfig
	include Logging
	
	attr_accessor :server, :username, :password, :commands
	
	def initialize
		super()
		@commands = []
	end
	
	def execute()
		Net::SSH.start(@server, @username, :password => @password) do |ssh|
			@commands.each{|cmd|
				@logger.info "Executing remote command: #{cmd}"
				output = ssh.exec!(cmd)
				@logger.info 'SSH output: '
				@logger.info output
			}
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
albacore-0.0.7 lib/albacore/ssh.rb