Perl & CGI/Remote access in Perl
QUESTION: I need to execute some commands in remote linux machine and for that Perl says that i should use some module like Net::SSH. Am a beginner in perl sripting and could u pls help me how and where to save the module after downloading. urgent requirement!!!
There are two methods you can use to install the Net::SSH module, CPAN, or via manual install.
To use CPAN type:
perl -MCPAN -e ‘install Net::SSH::Perl’
To perform a manual install, download the module from the CPAN website from this link:
Unpack it, then execute the commands to build and install the module:
My recommendation is to use the first method since the CPAN module should install any prerequisite modules required by Net::SSH
Let me know how this works for you,
---------- FOLLOW-UP ----------
QUESTION: Hi thanks for the reply...
I tried with your suggestion and I got an error as mentined below.
cpan> perl -MCPAN -e `install Net::SSH::Perl'
Text::Parsewords could not parse the line [perl -MCPAN -e `install Net::SSH::Per
l'] at C:/Perl64/lib/CPAN.pm line 369, <IN> line 1.
Could you pls help me out with the solution.
Try the following steps:
1. Execute the CPAN interactive shell
perl -MCPAN -e shell
Note: you may be prompted for some information if you have never run CPAN before. Answer the questions the best you are able. For the most part the defaults provided will suffice.
2. From within the CPAN interactive shell
This last command will attempt to install the Net::SSH::Perl module (along with any prerequisite modules) on your system.