H
hemant
I want to extend Rake with a method rshell, which would enable anyone
to execute a command remotely on various UNIX boxes.
Also, if the command asks for input, then remote process's stdin
should be connected to current processes stdin. So, if the command
asks for input, user can type it from current machine.
I have looked into Net::SSH, but can't find a reliable way to
connecting remote processes stdin to current process.
Capastrino does something like this, but not sure how?
I am trying on these lines
module Rake
class RemoteShell
attr_accessor :remote_ip,:user,
assword,:remote_shell,:channels
def start_ssh_session
@channels ||= []
@channels << Net::SSH.start(@remote_ip,@user,@password)
end
def r_shell command
# open a channel and execute the command
# remote process should be connected to current process stdin
end
end
end
to execute a command remotely on various UNIX boxes.
Also, if the command asks for input, then remote process's stdin
should be connected to current processes stdin. So, if the command
asks for input, user can type it from current machine.
I have looked into Net::SSH, but can't find a reliable way to
connecting remote processes stdin to current process.
Capastrino does something like this, but not sure how?
I am trying on these lines
module Rake
class RemoteShell
attr_accessor :remote_ip,:user,
def start_ssh_session
@channels ||= []
@channels << Net::SSH.start(@remote_ip,@user,@password)
end
def r_shell command
# open a channel and execute the command
# remote process should be connected to current process stdin
end
end
end