in reply to getting input without submit

I'm trying to write a program in perl which runs ssh login to a unix box interactively from a web browser.

Sorry, but... Why do you want to do that? That is, what are you trying to accomplish, really? (What is the goal?)

While you work on the answer to that question, think about this: supposing you could succeed in starting an interactive login on a unix box from a web browser. What would happen next? What goes to the browser if/when the login succeeds? What do you expect to happen to the login when the perl script on the webserver finishes writing stuff back to the browser?

(Hint: a unix login implies an interactive shell, which sends a prompt to the user via its stdout, waits for a command line on its stdin (typically a tty device), and exits when it detects EOF on stdin or a write failure on stdout. You can do a login that simply executes a particular script or process, but this is non-interactive.)

Depending on what you're actually trying to accomplish, there's probably a way to do it -- but if it involves an interactive login shell on the unix box, I don't think you'll be doing that via a browser.

Replies are listed 'Best First'.
Re^2: getting input without submit
by js1 (Monk) on Nov 17, 2005 at 19:25 UTC

    Thanks for your reply. I do take your points but let me try and explain a bit better what I'm trying to do.

    I have been coding something (in Perl) like Webmin which enables an Adminstrator to set up an apache instance by configuring it in a browser. So far, I've got it to create the apache config, and import this to CVS through a series of forms where the user is asked to fill in brief details e.g. ServerName, Listen, etc.

    The next step I want it to do is deploy the instance to the remote server where it's going to run.

    I could probably do this quite easily with Net::SSH or Expect.pm if it wasn't for the fact that we don't allow Root logons at work. A user must ssh to the remote box as themselves first, then su.

    The problem is there are a lot of boxes, and authentication is usually via SecurID (although sometimes it's password). That's where I need to go back to the user and get their password or passcode.

    I realise it would be a lot easier if I pulled the install to the box instead of pushing it out, but for convenience, I'd just like to come up with a way to push out the deployment so the apache config, cvs commit and deployment could all be done from one place.

    Thanks,

    js1.