Add basic Remote#execute implementation

This commit is contained in:
Thibault Jouan committed 2013-08-05 20:03:13 +00:00
1 parent 6e1ba269eb
commit ace5bfb3fa
2 files changed
+52

No files matched your search

+9
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