raghu_shekar has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying a simple perl script to automate ssh login. Looks like everything is fine except that i think the module Net::SSH::Perl is not installed in our server. Cause i get the error "Can't locate Net/SSH/Perl.pm in @INC". Also the real problem is that i do not have the previlages to install any module because this is a server at work. Any workaround or alternate method to achieve this...??? Please find below my code:
#!/usr/bin/perl use Net::SSH::Perl; my $host = "hostname"; my $usr = "my userid"; my $pwd = "my password"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($usr,$pwd); my($stdout, $stderr, $exit) = $ssh->cmd("ls -l /home/$usr");

Replies are listed 'Best First'.
Re: SSH using a perl script
by Anonymous Monk on Mar 17, 2010 at 06:21 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.