On 12/01/2014 04:29 AM, Priyal Jain wrote:
Hi,

For establishing ssh session between client and server, which is better method: 1. Net::SSH2 : http://search.cpan.org/~rkitover/Net-SSH2-0.53/lib/Net/SSH2.pm <http://search.cpan.org/%7Erkitover/Net-SSH2-0.53/lib/Net/SSH2.pm> 2. Expect : http://search.cpan.org/~rgiersig/Expect-1.15/Expect.pod <http://search.cpan.org/%7Ergiersig/Expect-1.15/Expect.pod>

What are the advantages of using Net::SSH2 over Expect??



Thanks
Regards
Priyal

Priyal,

I have had good luck using Net::OpenSSH together with Expect. There is an example of using the two together in the examples directory of Net::OpenSSH. The example is named expect.pl.

Net::OpenSSH is fairly powerful "right out of the box".. you may not even need to use Expect for typical applications.

Good luck.

Nathan

Reply via email to