Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- thufir@dur:~/ruby$
- thufir@dur:~/ruby$
- thufir@dur:~/ruby$ ruby ssh.rb
- /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)
- 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'
- 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'
- from /home/thufir/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
- from /home/thufir/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/timeout.rb:97:in `timeout'
- 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'
- from /home/thufir/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.6.8/lib/net/ssh.rb:192:in `new'
- from /home/thufir/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.6.8/lib/net/ssh.rb:192:in `start'
- from ssh.rb:15:in `<main>'
- thufir@dur:~/ruby$
- thufir@dur:~/ruby$ cat ssh.rb
- #!/usr/bin/env ruby
- require 'rubygems'
- require 'net/ssh'
- require 'yaml'
- conn = YAML.load_file('conn.yml')
- hst = conn['host']
- prt = conn['port']
- usr = conn['user']
- pwrd = conn['password']
- params = {:port => "prt",:password => "pwrd"}
- Net::SSH.start(hst, usr, params) do |ssh|
- puts 'hi'
- end
- thufir@dur:~/ruby$
Advertisement
Add Comment
Please, Sign In to add comment