Skip to content

Instantly share code, notes, and snippets.

@brianjolly
Created June 7, 2011 02:06
Show Gist options
  • Save brianjolly/1011544 to your computer and use it in GitHub Desktop.
Save brianjolly/1011544 to your computer and use it in GitHub Desktop.
Quick net-ssh example
#!/usr/bin/env ruby
#gem install net-ssh
require 'rubygems'
require 'net/ssh'
HOST = '192.168.1.1'
USER = 'me'
PASS = 'secret'
#Net::SSH.start( HOST, USER, :password => PASS ) do|ssh|
result = ssh.exec('ls')
puts result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment