class Net::SSH::Connection::Channel
def exec(command, &block)
end
puts "alas! the command could not be invoked!"
else
# this is a good place to hang callbacks like #on_data...
puts "command has begun executing..."
if success
channel.exec "ls -l /home" do |ch, success|
command altogether failed to be executed.
is being executed, not that it has completed, and failure means that the
request succeeded or not. In this case, success means that the command
channel, and the second will be true or false, indicating whether the
called when the server responds. The first parameter will be the
that the given command be invoked. If the block is given, it will be
Syntactic sugar for executing a command. Sends a channel request asking
def exec(command, &block) send_channel_request("exec", :string, command, &block) end