Method: Net::SSH::Session#initialize
- Defined in:
- lib/net/ssh/session.rb
#initialize(host, user, password = '', options = {}) ⇒ Session
Initialize a new ssh session
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/net/ssh/session.rb', line 24 def initialize(host, user, password='', ={}) @host = host @user = user @port = [:port] || 22 @password = password @history = [] @track_history = true @timeout = [:timeout] if [:history] == false @track_history = false end if @timeout && !@timeout.kind_of?(Integer) raise ArgumentError, "Timeout value should be numeric" end end |