in reply to Re: SSH and expect without module
in thread SSH and expect without module

Hi,

I think I am going to make test with th ling to perlipc. the main idea was to make one script to configure several builders according the builders (maybe more in the futur) following by the IP adress

Cisco 172.22.99.254 ... Extreme Networks 172.29.24.239 ... HP 172.28.127.245 ... Symbol Technologies, Inc. 10.150.238.1

for each, check if the symbole is > or # at the prompt and send lines for specifics builders.

Replies are listed 'Best First'.
Re^3: SSH and expect without module
by haukex (Archbishop) on Mar 16, 2017 at 19:29 UTC
    I think I am going to make test with th ling to perlipc.

    IPC can be tricky, especially interactive communication with processes on remote machines, as you seem to want to do. Let me put my advice a different way: I suspect the time you spend on getting the appropriate modules installed will be less than the time necessary to re-invent the IPC wheel.

      After the time spent on this topic

      I think your right. I think I am going to check for another machine, an administrator to make the job or look for "expect" script.

      Thanks all :)

        an administrator to make the job

        Note that you don't necessarily need administrator access to install modules. Here are some options:

        • Use perlbrew to install an entire build of Perl into your home directory. This requires build prerequisites such as a C compiler to be available on the machine. If this works, this is probably the best option, because you can do whatever you like with this local installation of Perl, like install all the modules you like via cpan or cpanm, etc.
        • I linked you to "Yes, even you can use CPAN" above, and the replies in that thread contain more advice, such as local::lib, which makes it easier to install modules on a machine that you don't have administrator access to, by installing them in your home directory. In the local::lib docs, the section "The bootstrapping technique" describes how to install the module itself without administrator access, before using it to install other modules.
        • If you're unsure about the process of installing modules itself, then "A Guide to Installing Modules" explains the basics of installing modules manually (although once they are set up, using cpan or cpanm is easier because they will automatically install dependencies as well).
        • Some modules such as Net::OpenSSH are pure-Perl modules (there is no C code that needs to be compiled) with no non-core dependencies, so you can "hack" their installation by copying over their lib directory.