Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by essej1 (Novice)
on Sep 01, 2012 at 19:20 UTC ( #991186=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Forced to modify perl telnet script to use both telnet and ssh
in thread Forced to modify perl telnet script to use both telnet and ssh

Sorry I wasn't clear. We currently do have a working Perl/telnet script. Due to new security requirements we are moving to SSH. So, not all devices support SSH but will sometime in the future. Therefore I have to have a single script to handle both Telnet and SSH. (Lucky me). As stated, my dinosaur of a boss (he refuses to use new technology such as ZFS on Solaris) wants to "simply" modify the current script to handle both connections using the existing commands.


Comment on Re^3: Forced to modify perl telnet script to use both telnet and ssh
Re^4: Forced to modify perl telnet script to use both telnet and ssh
by philiprbrenan (Monk) on Sep 01, 2012 at 19:56 UTC

    Please go through your script adding statements like this:

    if ($device->{supportsSSH}) {SSH code} else {Telnet code}

    After a while you may notice that blocks of code keep getting repeated. Please consider refactoring them into sub {}'s as you work through your script.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2014-08-27 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (232 votes), past polls