Method: Net::SSH::Connection::Channel#subsystem
- Defined in:
- lib/net/ssh/connection/channel.rb
#subsystem(subsystem, &block) ⇒ Object
Syntactic sugar for requesting that a subsystem be started. Subsystems are a way for other protocols (like SFTP) to be run, using SSH as the transport. Generally, you’ll never need to call this directly unless you are the implementor of something that consumes an SSH subsystem, like SFTP.
channel.subsystem("sftp") do |ch, success|
if success
puts "subsystem successfully started"
else
puts "subsystem could not be started"
end
end
175 176 177 |
# File 'lib/net/ssh/connection/channel.rb', line 175 def subsystem(subsystem, &block) send_channel_request("subsystem", :string, subsystem, &block) end |