in reply to Pass a parameter to remote perl script
Command line parameters can be passed right after executable file name, according to the documentation:
Usage: plink [options] [user@]host [command]Run your commands like this: system("$putty\\plink -pw <password> root\@$server /usr/bin/perl /manu/test/test.pl $myparameter")
Inside the remote script, use @ARGV or Getopt::Std or Getopt::Long.
You can also write your script using Net::SSH, not PuTTY. Authorisation by public key is also safer when running a script.
|
|---|