Monks,

I seek advice about writing a login script. I work in a UNIX environment of about 1700 servers, mostly SUN running solaris 5.8, and IBM running AIX 5L. The criteria for my script is as follows:


  • Preferrably ssh to the requested server or telnet if it is not installed. Install ssh package if ssh is not installed.

  • If ssh is installed, the script should copy my rsakey from my home directory to the remote server to allow login without a password.

  • Log all hosts that have ssh installed with RSA key added so the script knows when not to use a password.

  • Encrypt my password when sending via Telnet i.e. MD5, RSA

  • su to root and drop into interactive mode after completing the above. (Expect?)

  • Any suggestions on how I would complete the above would be greatly appreciated. Modules used in the past, scripting methods, etc.. My scripting skills leave something to be desired, but I believe this may help future endeavors.

    Thanks in advance,
    /dev/null

    In reply to Login Script by /dev/null

    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.