Connect to multiple unix servers

D

darkknight56

Hello. I'm new at perl and am faced with a problem. I work with
multiple unix servers and I need to execute the same commands on each
of them. I'd like to automate this with perl so I was hoping someone
could point me in the right direction as to what package to use or
where there may be some code snippets I could learn from and modify.
I know there is the telnet module but if I fail to connect on one
server, I still need to proceed onto the next one.

Any help would be appreciated.

darkknight56
 
D

Dirk Heinrichs

darkknight56 said:
Hello. I'm new at perl and am faced with a problem. I work with
multiple unix servers and I need to execute the same commands on each
of them.

Debian distributed shell is your friend.

HTH...

Dirk
 
D

darkknight56

Debian distributed shell is your friend.

HTH...

        Dirk

Sorry but I'm running a recent Activestate release of perl from a
Windows server to the various unix servers. From windows, I need to
connect to one unix server, execute some commands, logout from that
box then move onto the next box and repeat the process all over again.

Darkknight56
 
X

xhoster

darkknight56 said:
Sorry but I'm running a recent Activestate release of perl from a
Windows server to the various unix servers. From windows, I need to
connect to one unix server, execute some commands, logout from that
box then move onto the next box and repeat the process all over again.

Net::Telnet?

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
 
M

Mart van de Wege

Net::Telnet?
Telnet is deprecated.

Net::SSH will do nicely. It requires an ssh.exe on the Winbox, but
Putty and Cygwin/OpenSSH are just another free download away.

Mart
 
T

Ted Zlatanov

d> Hello. I'm new at perl and am faced with a problem. I work with
d> multiple unix servers and I need to execute the same commands on each
d> of them. I'd like to automate this with perl so I was hoping someone
d> could point me in the right direction as to what package to use or
d> where there may be some code snippets I could learn from and modify.

Perl won't solve your problem: executing commands on a distributed
network. Check out tools like cfengine and Puppet that specialize in
doing this (especially if the commands are not going to change much over
time). cfengine in particular will do many of the tasks you're probably
thinking of, like monitoring/restarting/killing processes and
distributing files, without any custom work.

d> I know there is the telnet module but if I fail to connect on one
d> server, I still need to proceed onto the next one.

You can do that with Net::Telnet and Net::SSH.

Ted
 
C

C.DeRykus

On Nov 19, 9:00 am, Mart van de Wege
....
Telnet is deprecated.
...

Net::Telnet can be useful running over an ssh connection to change
passwords however.
 
M

Mart van de Wege

C.DeRykus said:
On Nov 19, 9:00 am, Mart van de Wege
...

Net::Telnet can be useful running over an ssh connection to change
passwords however.

Well yeah. There is equipment out there that doesn't speak SSH yet, so
Telnet-over-SSH is a decent solution for that.

OTOH, for the parent use case, Telnet is definitely deprecated.

Mart
 
D

Dirk Heinrichs

darkknight56 said:
Sorry but I'm running a recent Activestate release of perl from a
Windows server to the various unix servers.

Either use putty in a simple for loop, or check wether dsh is available under cygwin.

Bye...

Dirk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top