Created
June 7, 2011 02:06
-
-
Save brianjolly/1011544 to your computer and use it in GitHub Desktop.
Quick net-ssh example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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