in reply to Re: Using Net::SSH2 with Net::Telnet::Cisco
in thread Using Net::SSH2 with Net::Telnet::Cisco

Salva-

thanks for the suggestion. My one concern is that the CPAN page for Net::OpenSSH states: 'For password authentication, IO::Pty has to be installed'. The problem I am experiencing with Net::Appliance::Session seems to come down to the fact that IO::Pty is (apparently) not thread safe. Have you tried this code in a threaded app?

Thanks,
Ryan

  • Comment on Re^2: Using Net::SSH2 with Net::Telnet::Cisco

Replies are listed 'Best First'.
Re^3: Using Net::SSH2 with Net::Telnet::Cisco
by salva (Canon) on Jan 20, 2011 at 20:40 UTC
    Have you tried this code in a threaded app?

    No, I usually prefer to use processes (via fork) rather than threads, and in that environment IO::Pty has never given me any problem.

    In any case, as IO::Pty is only used on the login phase, you could just use a lock to serialize it so that not more than one thread could be using it at the same time.

    Also, if you really find that IO::Pty is not thread safe, just report it to its maintainers... and if it affects Net::OpenSSH operation I would also like to know!