Add basic Remote#execute implementation

This commit is contained in:
Thibault Jouan
2013-08-04 17:33:19 +00:00
parent 6e1ba269eb
commit ace5bfb3fa
2 changed files with 52 additions and 0 deletions

View File

@@ -13,6 +13,15 @@ module Producer
def session
@session ||= Net::SSH.start(@hostname, Etc.getlogin)
end
def execute(command)
output = ''
session.exec command do |ch, stream, data|
output << data
end
session.loop
output
end
end
end
end