473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

to run a perl script from local machine that will login to remort servers and run a

Dear friends,

how to make a perl script that will login to different remort servers and run a script from the local machine, in a defenite directory in the server that will update the server.


thanks in advance
rohit
Mar 18 '08 #1
5 1358
Need urgent help...
please help me....
Mar 19 '08 #2
numberwhun
3,509 Expert Mod 2GB
Need urgent help...
please help me....
Well, what have you coded so far to do this? What are you planning on using to log into the remote machine? (ie: SSH, Telenet, etc?)

Show us the code that you hve been working on and we will do what we can to assist you.

Regards,

Jeff
Mar 19 '08 #3
Well, what have you coded so far to do this? What are you planning on using to log into the remote machine? (ie: SSH, Telenet, etc?)

Show us the code that you hve been working on and we will do what we can to assist you.

Regards,

Jeff
ok jef.
i am writing the code i plan....

>cd /home/user1
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. my $i = 1;
  4. my $add = "192.168.10.";
  5.  
  6. for( $i = 1, $i < 60, i++ ){
  7.  
  8. my $flg = `ssh "$add . $i"`;
  9.  
  10. ## say ssh donot required password as key-gen is already set, and i have ##exported to all machines.
  11.  
  12. if ($flg == 0){
  13.  
  14. # now i want to run a script on the remort machine's /etc/httpd, but the script in #on the local machine /home/user1.
  15.  
  16. }
  17.  
Mar 20 '08 #4
numberwhun
3,509 Expert Mod 2GB
ok jef.
i am writing the code i plan....

>cd /home/user1
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. my $i = 1;
  4. my $add = "192.168.10.";
  5.  
  6. for( $i = 1, $i < 60, i++ ){
  7.  
  8. my $flg = `ssh "$add . $i"`;
  9.  
  10. ## say ssh donot required password as key-gen is already set, and i have ##exported to all machines.
  11.  
  12. if ($flg == 0){
  13.  
  14. # now i want to run a script on the remort machine's /etc/httpd, but the script in #on the local machine /home/user1.
  15.  
  16. }
  17.  
Personally, instead of trying to do all of this via a system() command, I think you should read up on using a module for the SSH. It would make things easier.

Regards,

Jeff
Mar 20 '08 #5
Personally, instead of trying to do all of this via a system() command, I think you should read up on using a module for the SSH. It would make things easier.

Regards,

Jeff
thanks a lot.issue resolved...
Mar 24 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: DP | last post by:
(2nd post, I think my first may have been to the wrong group - sorry) Hello Perl-ers - I´m hoping I can get some help here, because I'm very lost. Don't know Perl, I'm not a programmer. And...
3
by: FLOTServer | last post by:
Here's my problem: I run a gameserver that runs the game "Medal of Honor". On the game server is log file which contains all of the data from the players for that day (kills, deaths, etc...). I...
10
by: Hendry Taylor | last post by:
I wrote a perl script and tested it on windows and it works fine. I then moved it onto a solaris machine and now it says that there is a syntax error with the following line of code: $user1 =...
4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
9
by: 8anos | last post by:
Hello, I am new at the community and newbie at programming :) As you may know rapidshare provides a perl script for linux, to upload files at their servers. You can find the original scripts at...
5
by: sat | last post by:
Hi, I'm working as a DB2 UDB DBA. I have some questions regarding SCP command... Actually every week redirect restore takes place from one of my production servers to test servers.. So, but...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
6
by: sherrygomindes | last post by:
Hi I have written a perl script using the Telnet module. I need to remotely login in from one windows XP machine to another XP machine. But i get errors which i can't figure out the reason....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.