From: Daniel Sheppard Date: 2004-04-21T14:27:57+09:00 Subject: Re: idiot's guide to druby using ssh tunnels There's nothing special about druby, you'd just tunnel it like anything else. # -------- Server Code: require 'drb/drb' class ServerObj def initialize @count = 0 end def kick @count = @count + 1 puts "I have been kicked #{@count} times" @count end end DRb.start_service('druby://localhost:666', ServerObj.new) # -------- Client SSH Command: ssh -f -L 888:localhost:666 username@servername "while echo .; do sleep 60; done" > /dev/null # -------- Client Code: DRb.start_service serverObj = DRbObject.new_with_uri('druby://localhost:888') 10.times { puts "Server has been kicked #{serverObj.kick} times" } I don't believe there is an ssh library for ruby, otherwise you'd be able to get a pure ruby solution. > -----Original Message----- > From: Ara.T.Howard [mailto:Ara.T.Howard@noaa.gov] > Sent: Wednesday, 21 April 2004 3:04 PM > To: ruby-talk ML > Subject: idiot's guide to druby using ssh tunnels > > > i'm in need of one ;-) > > the situation i'm in is that i'd like to write a drb app, but > ssh is the only way into any of our machines... > > -a > -- > ============================================================== > ================= > | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov > | PHONE :: 303.497.6469 > | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 > | URL :: http://www.ngdc.noaa.gov/stp/ > | TRY :: for l in ruby perl;do $l -e "print > \"\x3a\x2d\x29\x0a\"";done > ============================================================== > ================= > > > ##################################################################################### This email has been scanned by MailMarshal, an email content filter. #####################################################################################