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

Re: Forced to modify perl telnet script to use both telnet and ssh

by Tanktalus (Canon)
on Aug 31, 2012 at 23:22 UTC ( #991097=note: print w/ replies, xml ) Need Help??


in reply to Forced to modify perl telnet script to use both telnet and ssh

"depending on the response from the devices." What response? This is probably the most confusing aspect.

"has some differences from true CPAN" - Yes, even you can use CPAN (I expect CPAN modules to still be installable - we do it all the time with the system perl on AIX, so I don't see why openCSW would be worse).

Though, honestly, I prefer ssh over telnet anyway. It's just so easy to run "ssh user@host 'my command here'". But if you need to do both, I'm guessing that you can run "ssh user@host" nearly the same way as you telnet to the host. The major differences are at the beginning: the user won't be asked for, and the password prompt might be different (or not exist at all if you have an ssh key set up properly).

At $work, I use our own ssh wrapper to handle parallelism (using AnyEvent), ssh tunnels, multiple hops (ssh to A, and use that to ssh to B under the ssh key credentials available on A), etc. I didn't find it terribly difficult - at least, not the ssh parts. Unfortunately, your problem description remains a bit vague, so I don't know where to start in sharing.


Comment on Re: Forced to modify perl telnet script to use both telnet and ssh

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (16)
As of 2014-07-30 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (236 votes), past polls