Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hello again garcimo,

Sorry for the late reply but I got busy and I missed your reply. Let's go through line by line what you said.

I do not use 190 different password.. just one that can connect to all the servers

I do not know if you use WindowsOS but in case you are using LinuxOS I would create a script and do the following (pseudo code):

#!/usr/bin/perl use Expect; use strict; use warnings; my @devices = ("127.0.0.1", "localhost"); my $command = 'ssh'; my @params = ('-p', 22); # These is to bypass the prompt of each node for new ssh connection. foreach my $device (@devices) { # create an Expect object by spawning another process push @params, $device; my $exp = Expect->spawn($command, @params); $exp->send("yes"); } # Second step do the same with ssh-copy-id (ssh keys) # You said that all nodes share the same password so it should be very + easy to create ssh keys for all nodes from the main node.

The idea of the script is to bypass the ssh prompt on all nodes and then create ssh keys on all nodes. See also relevant question SSH - Key Authentication for more information on that.

After that it is upon you if you want to capture the output of each node on different file stored in specific dir or append each node on one file.

If in any case my description is complicated comment under and I will try to reply with more details on the part that you do not understand.

Hope this helps, BR

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re^3: parse /etc/passwd and output it as csv in hundred servers by thanos1983
in thread parse /etc/passwd and output it as csv in hundred servers by garcimo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-24 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found