perldesire has asked for the wisdom of the Perl Monks concerning the following question:
Here's my requirement:
From linux machine write a perl script to ssh to windows machine (ip address given in the command line) and execute one exe file in windows machine.
I tried the following code:
It prints the following :use Net::SSH::Perl; $sshobj = Net::SSH::Perl->new($ARGV[0]); $sshobj->login("user", "password") or die "error $!\n"; ($out,$err,$ext)= $sshobj->cmd('\"C:\platform\bin\lo100cfg.exe\" -s 1 +>nul 2>&1'); print "----->$out<--\n"; print "----->$err<--\n"; print "----->$ext<--\n";
-----><-- ----->C:\platform\bin\lo100cfg.exe: not found<-- ----->0<--
But this exe file is located in the given location, but still its saying exe not found... what could be the issue?
Please give your ideas...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net:::SSH::Perl to windows machine
by Anonymous Monk on Sep 16, 2009 at 15:38 UTC | |
by perldesire (Scribe) on Sep 17, 2009 at 06:48 UTC | |
by Illuminatus (Curate) on Sep 17, 2009 at 12:45 UTC | |
by perldesire (Scribe) on Sep 17, 2009 at 14:27 UTC | |
|
Re: Net:::SSH::Perl to windows machine
by Illuminatus (Curate) on Sep 16, 2009 at 18:54 UTC |