Sha256: 2ead06b7f69a22612de6a4365d5d852aa94769d710cc763d6205ea92be0fa4a4

Contents?: true

Size: 503 Bytes

Versions: 2

Compression:

Stored size: 503 Bytes

Contents

Alternatively, you can use Net::SSH::Session to start your SSH sessions. The @Net::SSH.start@ interface described above is simply a convenience for creating a new Session object explicitly.

[!figure lang=ruby,number=true,caption=Using Net::SSH::Session
require 'net/ssh'

Net::SSH::Session.new(
  'host', 'username', 'password',
  :compression => "zlib"
) do |session|
  ...
end
!]

Note that Net::SSH::Session#new accepts the same parameters as Net::SSH.start, and may also be called without a block.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
net-ssh-1.0.0 doc/manual/parts/session_session.txt
net-ssh-0.9.0 doc/manual/parts/session_session.txt