vcjae00 has asked for the wisdom of the Perl Monks concerning the following question:

I have inherited a GUI application that does many things. My issue at this time is that it tails some log files on different servers using rsh, which has now been disabled on these servers. I would like to use Net::SSH but need help. The application takes input from the log files, filters out the more mundane lines and displays them in the GUI. What would be the best way to approach this with SSH (or is there a better solution) Thanks

Replies are listed 'Best First'.
Re: Using SSH
by Your Mother (Archbishop) on Apr 07, 2009 at 18:43 UTC

    If you already have a working solution with rsh, why not try to adapt it to use ssh? It should require just a bit of tinkering. Don't put passwords in code. Maybe set up the script runner to have an .ssh config to allow it to do what it needs to do (and nothing else).

      I've tried that, but when I shutdown the application the ssh thread remains and I have to kill it manually. Is there a way to make sure the thread is cleaned up?

        Yes. You can keep track of the pids of the ssh runs. I, however, am not the right monk to throw down an example of how to do that.

        Try to distill it down to a snippet that runs something you're doing and post it as a new SoPW asking how to keep track of and kill/close the ssh when you're done with it.