Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Problems with Net::OpenSSH

by aeaton1843 (Acolyte)
on Nov 23, 2010 at 16:15 UTC ( #873244=note: print w/ replies, xml ) Need Help??


in reply to Re: Problems with Net::OpenSSH
in thread Problems with Net::OpenSSH

Oh how I wish they did. Cisco didn't add that functionality until IOS 15.0.1(M1) or so. Most of our routers are still in the 12.x train. I am actually controlling some F5's with Net::SSH in the manner in which you are suggesting. It works very well except for one thing. I wrote this module as a threaded app with ithreads and Net::SSH isn't thread safe. I found thanks to this site that Net::SSH::Perl isn't thread safe either. What I may end up doing is moving all of the Cisco routers into code that uses Net::SSH::Perl and use parent/child forking. I suppose I never really found out whether Net::OpenSSH is thread safe. I went looking for it and never found the information.


Comment on Re^2: Problems with Net::OpenSSH
Re^3: Problems with Net::OpenSSH
by salva (Monsignor) on Nov 23, 2010 at 17:39 UTC
    Net::OpenSSH is pure perl and does not use any globals, so it should be thread safe. Though I (BTW, I am the author) have never used it in threaded applications. IIRC, nobody have reported problems related to threads either.

    Anyway, Net::OpenSSH can be used asynchronously, you don't even need threads to handle connecting in parallel to several hosts. Check also Net::OpenSSH::Parallel.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873244]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2014-10-01 22:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (40 votes), past polls