Skip to content

Instantly share code, notes, and snippets.

@jondot
Created November 29, 2012 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jondot/4169817 to your computer and use it in GitHub Desktop.
Save jondot/4169817 to your computer and use it in GitHub Desktop.
require 'net/ssh'
Net::SSH.start('localhost', 'jondot', :password => 'foobar') do |ssh|
result = ssh.exec!('ls -l')
puts result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment