Fellow Monks, I come again in search of enlightenment...

We have a *nix server with a shared login (call it abc). Recently, code was put into the .profile for abc (in /home/abc) that required users provide a unique name so that history files could be separated. This was also done to root.

In the meantime, I have been building a script to automate some work being done... and the addition of this code killed my script. I am now seeing intermittent timeouts during the login process. I went in tonight and commented that code in .profile, and all worked well (no more timeouts at all). Here's what the login process looks like now (new lines between "No mail..." and "Term Type...")...

login as: abc abc@1.2.6.8's password: Last login: Thu Jan 16 13:46:28 UTC 2014 from 1.2.3.8 on pts/0 WARNING! This computer system and network is PRIVATE and ... No mail for abc Please enter your unique ID: IJAF History will be kept in /home/abc/.history-IJAF Term type is now xterm hostname:/home/abc->

I am using Control::CLI to manage my interactions with the server. My current code looks like this:

$cli = new Control::CLI( Use => 'SSH', Timeout => 30, ); $cli->connect( Host => $host, Username => 'abc', Password => 'pass', ); $port = $cli->port; if ( defined($port) ) { print "\tSSH connection to server ($host) established!\n"; } else { print "\tSSH connection to server ($host) could not be established +... Exiting program.\n"; exit; }

Documentated examples of Control::CLI on the net are virtually non-existent (at least, in my searches). Do any of you Monks have any knowledge of how I can alter my code to deal with the additional prompt? Or, even any suggestions?

Thanks in advance!


In reply to Control::CLI and Additional Prompt At Login by ImJustAFriend

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.