Nice, looks like this would work.  Just have to make sure that 4242 is
firewalled or only bound to lo on the server side.

As far as I can tell, all traffic is tunneled via SSH, so unless
something is on your machine (or your server) sniffing your loopback
device (or unless my understanding of how tunneling works), it should
be totally protected.

On May 5, 6:46 pm, "Robert Dober" <robert.do... / gmail.com> wrote:
> On 5/5/07, eden li <eden... / gmail.com> wrote:> Interesting... although it sounds a bit insecure since you don't
> > authenticate and it's being run in the clear over the wire.
>
> > I wonder if there's a way to get ruby to tunnel this via ssh.
>
> Unless ruby sends address information on the application layer (as
> e.g. Corba does or in redirects) you can do ssh port forwarding.
>
> Let youIRBserver serve on server:4242, assuming an ssh server
> listening on port 22 on the server and a user ruby just do the
> following on the client machine
>
> ssh -fNL 2222:localhost:4242 ruby@server # (1)
>
> do not forget to kill the ssh process on the client eventually.
>
> The ruby client connects to localhost:2222 on the client machine now.
>
> (1) N.B. localhost is localhost at the server.
>
> HTH
> Robert