thufir

Untitled

Aug 27th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. require 'rubygems'
  3. require 'net/telnet'
  4. require 'yaml'
  5. require 'pry'
  6.  
  7. conn = YAML.load_file('conn.yml')
  8.  
  9. paramsLong = {:host => conn['host'], :user => conn['user'],
  10. :port => conn['port'],:password => conn['password']}
  11.  
  12. puts paramsLong
  13.  
  14.  
  15. tn = Net::Telnet::new("Host" => conn['host'], "Port" => conn['port'], "Timeout" => 6000,
  16. "Output_log"=>"output_log.log",
  17. "Dump_log"=> "dump_log.log",
  18. "Prompt" => /[#]/ )
  19.  
  20. puts 'connected!!'
Advertisement
Add Comment
Please, Sign In to add comment