in reply to mod_perl persistent SSH connections

Net::SSH establishes a new SSH connection for every command it has to run. If you want to reuse connections, you will have to use some other module as Net::SSH2, Net::OpenSSH or Net::SSH::Perl.

Even then, these modules will by default create a new session for every command run. If you want to keep the sessions open you will have to run a shell and talk to it through its STDIN/STDOUT channels. Expect may be useful for that (or Net::SSH::Expect).

  • Comment on Re: mod_perl persistent SSH connections