Net-SSH-Perl - Using Expect.pm with Net-SSH-Perl

Posted on Fri Jul 13 19:31:17 2007 by semireg
Using Expect.pm with Net-SSH-Perl
Does anyone know a way to integrate Net-SSH-Perl with Expect.pm?

Net-SSH-Perl can only execute commands via $ssh->cmd, whereas, Expect.pm only works with an external command:

my $exp = Expect->spawn($command, @params)

or a file handle:

my $exp = Expect->exp_init(\*FILEHANDLE);

Thoughts on how to bridge this gap?
Direct Responses: 5728 | Write a response