class RemoteTerminal::SSH
Public Instance Methods
run(server, remote_directory, cmd)
click to toggle source
# File lib/remote-terminal/ssh.rb, line 3 def run(server, remote_directory, cmd) IO.popen("ssh #{server} 'cd #{remote_directory} && #{cmd}'") do |f| output = f.gets while output puts output output = f.gets end end return "" end