收成 安装 将此行添加到您的应用程序的Gemfile中: gem 'harvest' 然后执行: $ bundle 或将其自己安装为: $ gem install harvest 用法 require 'harvest' Harvest.configure do source "centos7 'exsample-server', 'ssh://vagrant:vagrant@localhost', port: 2222" template(type: :centos7) do bind(:iplist) do cmd('ifconfig') end end end s = Harvest.get('exsample-server', log: 'test.log') puts s.cmd('ls') puts s.cmd('hostna