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
|
|
0
|
|
|
|
Reply
|
darkknight56
|
11/18/2008 5:56:25 PM |
|
darkknight56 wrote:
> 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
|
|
0
|
|
|
|
Reply
|
Dirk
|
11/18/2008 6:50:24 PM
|
|
On Nov 18, 1:50=A0pm, Dirk Heinrichs <dirk.heinri...@online.de> wrote:
> darkknight56 wrote:
> > Hello. =A0I'm new at perl and am faced with a =A0problem. =A0I work wit=
h
> > multiple unix servers and I need to execute the same commands on each
> > of them.
>
> Debian distributed shell is your friend.
>
> HTH...
>
> =A0 =A0 =A0 =A0 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
|
|
0
|
|
|
|
Reply
|
darkknight56
|
11/18/2008 7:52:40 PM
|
|
darkknight56 <preynol@twmi.rr.com> wrote:
> On Nov 18, 1:50=A0pm, Dirk Heinrichs <dirk.heinri...@online.de> wrote:
> > darkknight56 wrote:
> > > Hello. =A0I'm new at perl and am faced with a =A0problem. =A0I work
> > > wit=
> h
> > > multiple unix servers and I need to execute the same commands on each
> > > of them.
> >
> > Debian distributed shell is your friend.
> >
> > HTH...
> >
> > =A0 =A0 =A0 =A0 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.
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.
|
|
0
|
|
|
|
Reply
|
xhoster
|
11/18/2008 8:05:12 PM
|
|
xhoster@gmail.com writes:
> darkknight56 <preynol@twmi.rr.com> wrote:
>> On Nov 18, 1:50=A0pm, Dirk Heinrichs <dirk.heinri...@online.de> wrote:
>> > darkknight56 wrote:
>> > > Hello. =A0I'm new at perl and am faced with a =A0problem. =A0I work
>> > > wit=
>> h
>> > > multiple unix servers and I need to execute the same commands on each
>> > > of them.
>> >
>> > Debian distributed shell is your friend.
>> >
>> > HTH...
>> >
>> > =A0 =A0 =A0 =A0 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.
>
> 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
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
|
|
0
|
|
|
|
Reply
|
Mart
|
11/19/2008 5:00:36 PM
|
|
On Tue, 18 Nov 2008 09:56:25 -0800 (PST) darkknight56 <preynol@twmi.rr.com> wrote:
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
|
|
0
|
|
|
|
Reply
|
Ted
|
11/19/2008 8:29:55 PM
|
|
On Nov 19, 9:00 am, Mart van de Wege
....
> >> 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?
>
> Telnet is deprecated.
> ...
Net::Telnet can be useful running over an ssh connection to change
passwords however.
--
Charles DeRykus
|
|
0
|
|
|
|
Reply
|
C
|
11/19/2008 10:30:43 PM
|
|
"C.DeRykus" <ced@blv-sam-01.ca.boeing.com> writes:
> On Nov 19, 9:00 am, Mart van de Wege
> ...
>> >> 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?
>>
>> Telnet is deprecated.
>> ...
>
> 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
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
|
|
0
|
|
|
|
Reply
|
Mart
|
11/20/2008 7:45:31 AM
|
|
darkknight56 wrote:
> 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
|
|
0
|
|
|
|
Reply
|
Dirk
|
11/21/2008 5:35:57 PM
|
|
|
8 Replies
57 Views
(page loaded in 0.144 seconds)
Similiar Articles: can we connect 2 sun servers to one T3 storage ? - comp.unix ...T3 Storage refused telnet connection - comp.unix.solaris ... FTP: lost connection while transfering multiple files - comp.unix ... can we connect 2 sun servers to one T3 ... FTP: lost connection while transfering multiple files - comp.unix ...FTP: lost connection while transfering multiple files - comp.unix ... can we connect 2 sun servers to one T3 storage ? - comp.unix ..... can connect a ... Problem when multiple SCP connections in Solaris 10 - ssh_exchange ...We have two Solaris 10 servers (A & B) setup for sending files between them via SCP. The keys/hosts configuration are set up between the two servers... Windows server, Unix client, connection refused on client connect ...Windows server, Unix client, connection refused on client connect ..... comp.sys.sun.admin Windows server, Unix client, connection refused on client connect ... Solaris DHCP server with multiple networks on one lan - comp.unix ...... NOT belong to the same network, so ... does multiple ... unix.solaris Hello, I have 2 server ... connect, but clients on LAN cannot connect or ping the RAS server ... Telnet -> connection refused in Solaris 10 - comp.unix.solaris ...T3 Storage refused telnet connection - comp.unix.solaris ... FTP: lost connection while transfering multiple files - comp.unix ... can we connect 2 sun servers to one T3 ... Configuring Apache to allow you to run Web base Remote Connection ...Apache 2, allow from localhost - comp.infosystems.www.servers.unix ... ... How to Allow Apache to connect to a remote ... on the web server it works just fine. Jumpstart multiple subnets with one server and quad NIC card ...... setup to use one server as jumpstart and boot server to serve multiple ... Setup the boot server on the system with the quad ethernet card. Connect ... comp.unix.solaris ... Client is not authorized to connect to Server - comp.unix.solaris ...Solaris server wont export display. - comp.unix.solaris Client is not authorized to connect to Server - comp.unix.solaris ..... on XP from a Solaris 10 machine. Socket Programming:TCP Echo Server and Multiple Client ...Socket Programming:TCP Echo Server and Multiple Client ... - fork() a child for each connection the server accepts. ... fork (UDP) server - comp.unix.programmer ... Execute Commands on Multiple Linux or UNIX ServersThis is Part I in a series - 'Execute Commands on Multiple Linux or UNIX Servers Simultaneously'. ... # connect each host and pull up user listing connect to multiple servers using SSH and execute commands - The ...Requirement: Run a shell script with below inputs file name checksum path the script should go to multiple servers (around 35) and verify the input cksum and if there ... 6/29/2012 5:41:15 AM
|