Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    best approach to script ssh/telneting into various servers

    Hi,

    I am starting out with scripting so forgive me if I am not wording something properly.

    I have written a script with bash and expect to ssh and telnet into a server and grab data. And I've been able to incorporate this on an apache server's cgi-bin directory so I can call the script via a web browser.

    I'd like to extend this to more than one server, gather data, make decisions based on that data to display a certain message, or connect to other servers to get even more data. I'd like to call ldapsearch and sqlplus (which I've done so far with oracle's Instant Client) commands. What is the best way to write this?

    * perl (took an online intro course and could learn it if needed)?
    * bash?
    * something else?

    Thanks.

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,942
    Thanks
    2
    Thanked 169 Times in 164 Posts
    Since this is a Perl forum, that's the direction I'll address.

    Perl has modules for doing each of your tasks.

    Start with some reading.

    Database:
    http://search.cpan.org/~timb/DBI-1.609/DBI.pm
    http://search.cpan.org/~pythian/DBD-....24a/Oracle.pm

    SSH:
    http://search.cpan.org/~rkitover/Net...ib/Net/SSH2.pm

    LDAP:
    http://search.cpan.org/~gbarr/perl-l...b/Net/LDAP.pod

  • #3
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for the links. i'll use this as a reason to learn more perl.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •