清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
require 'rubygems' require 'net/ssh' Net::SSH.start('example.com', :username=>'userName', :password=>'mypass') do |session| cmd = 'ls -l /home' session.process.popen3(cmd) do |stdin, stdout, stderr| puts stdout.read end end