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

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.

Replies are listed 'Best First'.
Re^4: SSH and expect without module
by touriste75 (Acolyte) on Mar 19, 2017 at 09:09 UTC

    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.
        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

        Note that in order to handle password authentication, Net::OpenSSH requires the XS-based module IO::Pty!.