Yes. From my original post:
"I'm trying to use Net::SSH::Perl to establish a secure connection to a server through CGI. I'm the VERY first to admit that perhaps this may not be the way to go but I'm a new and needing advice. Please PLEASE offer any!
I created a form with a 'post' to a cgi script. The cgi script tries to use Net::SSH::Perl to login to the server."
If there is a better way to do this than I am game.
In the long run I hope to use an HTML form to submit a job under a userid/password so that a job can execute as that user and return data to a directory owned by them.
Does anyone else do this? | [reply] |
Sorry -- the combination of GET and POST along with Net::SSH::Perl quite confused me.
You've already got quite a good answer from brother graff below, but essentially the problem is that you're trying to execute a secure, asynchronous process using an insecure, synchronous medium. It's just not a good fit.
Rather than focus on using Net::SSH, why not have a web application create a file in a certain location (perhaps based on the user's values in a form that you have them fill out), and have a cron job watch for the arrival of that file. When the file's arrival is noted, it can be moved (so it's not executed twice) and then used to execute a process, with the output data left in some suitable destination directory.
You could even send E-Mail to the submitter when the process is complete, or if this is part of a larger web application, flag the user that their job is done.
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
| [reply] |