I have a quick question as to how to address a problem, whether it is even doable, and what tools are out there that may help me solve this problem. I need to be able to deploy a secure terminal emulator through the web. My idea is: "it should be possible using mod_perl to write a handler, that when Apache receives a request for /foo/ssh_resource it creates a tunnel between the client that connected (a modified SSH applet that sends the GET request, and then drops down into the SSH protocol) and a SSH daemon on the internal network somewhere." My question is twofold:

A) is this doable? Is it possible to hijack an HTTP request after the GET in Apache (most likely using mod_perl) and basically connect it to a SSH daemon? (for ease on this first iteration, the SSH daemon can be on the localhost on an unblocked port to connections comming *from* the localhost)

b) has anyone does this before? can I get some pointers to tools? how would I go about this? Thanks in advance!


In reply to TCP Tunnel via an HTTP Resource... by eduardo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.