Anyone care to write a perl script that can use Net::SSH::Perl to ask for a password and passphrase then use Net::SSH::Perl to use the password function for the initial login and the passphrase to create a key on the server with a passphrase. This is for open SSH version 2 using des3. The advantage to this is one could set up secure shell keys on a large number of servers in a from a host list in a few minutes versus hours and hours. I am pretty sure it can be done. I have seen it done in KSH but it lacks the password answering and passphrase answering. Expect is not a very secure way to fix that which is why I am looking at using this module. Thanks looking forward to replies

2006-04-22 Retitled by Corion, as per Monastery guidelines
Original title: 'Net::SSH::Perl'


In reply to Use Net::SSH::Perl to ask for a password and passphrase by Anonymous Monk

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.