Skip to content

Instantly share code, notes, and snippets.

@boris
Created November 8, 2013 15:56
Show Gist options
  • Save boris/7373143 to your computer and use it in GitHub Desktop.
Save boris/7373143 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'net/ssh'
Net::SSH.start('server.fqdn', 'foo') do |ssh|
output = ssh.exec("uname -a ; whoami")
puts output
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment