Skip to content

Instantly share code, notes, and snippets.

@oafridi
Created July 1, 2014 16:52
Show Gist options
  • Save oafridi/aff53fffd888d0874014 to your computer and use it in GitHub Desktop.
Save oafridi/aff53fffd888d0874014 to your computer and use it in GitHub Desktop.
SSH using a ruby script
#!/usr/bin/env ruby
require 'rubygems'
require 'net/ssh'
Net::SSH.start('host', 'user' ) do|ssh|
result = ssh.exec!('')
puts result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment