Results 1 to 2 of 2
I'm not good on perl scripting but I have some knowledge on bash scripting.
I need to modify a perl script. As of the moment, it is dumping to a ...
- 05-11-2009 #1Linux Newbie
- Join Date
- Mar 2006
- Posts
- 101
help in perl how to output on the remote server
I'm not good on perl scripting but I have some knowledge on bash scripting.
I need to modify a perl script. As of the moment, it is dumping to a file in their home directory. I need to output it also to one of my server outside the network. I'm doing it via ssh using empty passphrase key. Could anyone give a suggestion on how I could do that.
Here is the sample snippet. How could I redirect to output of SPAMCFG to my remote server instead to $homedir.
open(SPAMCFG,">$homedir/mailspamcheck_settings.pl");
print SPAMCFG ("#\!\/usr\/bin\/perl\n\n\n");
print SPAMCFG ("#whitelist $username start\n");
Is is possible that I could output the SPAMCFG to my remote server using SSH??
open(SPAMCFG,"><REMOTE SERVER USERS's MAILDIR>/mailspamcheck_settings.pl");
print SPAMCFG ("#\!\/usr\/bin\/perl\n\n\n");
print SPAMCFG ("#whitelist $username start\n");
- 05-11-2009 #2Linux Newbie
- Join Date
- Mar 2006
- Posts
- 101
I just found out that there is a module on perl for ssh "Net::SSH::Perl"
I just need to know how to use it


Reply With Quote