SSHKit makes it easy to write structured, testable SSH commands in Ruby
https://github.com/capistrano/sshkit