thufir

Untitled

Aug 27th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. thufir@dur:~/ruby$
  2. thufir@dur:~/ruby$
  3. thufir@dur:~/ruby$ ruby ssh.rb
  4. /home/thufir/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.6.8/lib/net/ssh/transport/session.rb:67:in `initialize': getaddrinfo: Servname not supported for ai_socktype (SocketError)
  5. from /home/thufir/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.6.8/lib/net/ssh/transport/session.rb:67:in `open'
  6. from /home/thufir/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.6.8/lib/net/ssh/transport/session.rb:67:in `block in initialize'
  7. from /home/thufir/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
  8. from /home/thufir/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/timeout.rb:97:in `timeout'
  9. from /home/thufir/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.6.8/lib/net/ssh/transport/session.rb:67:in `initialize'
  10. from /home/thufir/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.6.8/lib/net/ssh.rb:192:in `new'
  11. from /home/thufir/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.6.8/lib/net/ssh.rb:192:in `start'
  12. from ssh.rb:15:in `<main>'
  13. thufir@dur:~/ruby$
  14. thufir@dur:~/ruby$ cat ssh.rb
  15. #!/usr/bin/env ruby
  16. require 'rubygems'
  17. require 'net/ssh'
  18. require 'yaml'
  19.  
  20. conn = YAML.load_file('conn.yml')
  21.  
  22.  
  23. hst = conn['host']
  24. prt = conn['port']
  25. usr = conn['user']
  26. pwrd = conn['password']
  27.  
  28. params = {:port => "prt",:password => "pwrd"}
  29. Net::SSH.start(hst, usr, params) do |ssh|
  30. puts 'hi'
  31. end
  32.  
  33. thufir@dur:~/ruby$
Advertisement
Add Comment
Please, Sign In to add comment