<br><tt><font size=2>"Paul E. Virgo" <Paul.E.Virgo@nasa.gov>
wrote on 05/04/2012 16:07:18:<br>
<br>
> Chris,<br>
> <br>
> That suggestion worked. I also added in a longer 'sleep' because of
<br>
> the time it takes a user to type in their PIN, then look at the <br>
> SecurID RSA token.<br>
</font></tt>
<br><tt><font size=2>Isn't the Token entered before you click connect on</font></tt>
<br><tt><font size=2>the nxclient ??</font></tt>
<br>
<br>
<br><tt><font size=2>FYI ICIH</font></tt>
<br>
<br><tt><font size=2>The sleep 0.3 is to tell expect to wait a quarter</font></tt>
<br><tt><font size=2>second, before sending the password TO SSH</font></tt>
<br>
<br>
<br><tt><font size=2>Often, password "reads" clear their buffers
after</font></tt>
<br><tt><font size=2>out-putting the prompt, so as not to try logging-in</font></tt>
<br><tt><font size=2>with "stray" keypresses, so a delay to allow
this</font></tt>
<br><tt><font size=2>to complete is helpful.</font></tt>
<br>
<br>
<br><tt><font size=2>If you want to test nxnode-login as it is deployed</font></tt>
<br><tt><font size=2>from nxserver, you need to try : -</font></tt>
<br>
<br>
<br><tt><font size=2> sudo su -l -s
/bin/bash nx</font></tt>
<br>
<br><tt><font size=2># then at the (nx user) prompt ( and all on one line
if it wrapped )</font></tt>
<br>
<br><tt><font size=2> echo my-password|/usr/bin/nxnode-login
ssh my-username 22 /usr/bin/nxnode --check</font></tt>
<br>
<br>
<br><tt><font size=2>You can see than the password is already there, before</font></tt>
<br><tt><font size=2>the launch of nxlogin-helper by nxserver</font></tt>
<br>
<br><tt><font size=2>and the </font></tt>
<br>
<br><tt><font size=2> expect_user -re
"(.*)\n"</font></tt>
<br><tt><font size=2> set password $expect_out(1,string)</font></tt>
<br>
<br><tt><font size=2>which reads from stdin,</font></tt>
<br><tt><font size=2>where</font></tt>
<br><tt><font size=2>you got that error first time</font></tt>
<br><tt><font size=2>is</font></tt>
<br><tt><font size=2>the script reading the password</font></tt>
<br><tt><font size=2>not</font></tt>
<br><tt><font size=2>ssh which isn't spawned till later.</font></tt>
<br>
<br>
<br><tt><font size=2>> Thanks, again, for the suggestion.<br>
> <br>
> PEV</font></tt>
<br>
<br><tt><font size=2>I don't know how long it takes a user to work one
of</font></tt>
<br><tt><font size=2>those ID things (2 mins?? (pin? pin? oh!what was it??))</font></tt>
<br><tt><font size=2>but</font></tt>
<br><tt><font size=2>if you set that sleep to too long</font></tt>
<br><tt><font size=2>thinking to</font></tt>
<br><tt><font size=2>"allow" one of your slow-coach seniors to
work it out,</font></tt>
<br><tt><font size=2>you may well</font></tt>
<br><tt><font size=2>start getting timeouts "further down the line",</font></tt>
<br><tt><font size=2>so</font></tt>
<br><tt><font size=2>if I was you I'd leave it as 0.3</font></tt>
<br>
<br>
<br><tt><font size=2>> Paul E Virgo</font></tt>
<br><tt><font size=2>> Sr. System Administrator</font></tt>
<br><tt><font size=2>> Code 610</font></tt>
<br><tt><font size=2>> SESDA II - DAAC/DISC</font></tt>
<br><tt><font size=2>> Goddard Space Flight Ctr</font></tt>
<br>
<br><tt><font size=2>Nice place to work.</font></tt>
<br>
<br><tt><font size=2>Who's heard of Goddard these days ??</font></tt>
<br><tt><font size=2>but I notice von Braun knew all</font></tt>
<br><tt><font size=2>about him.</font></tt>
<br>
<br><tt><font size=2>Shame he died and missed out on doing</font></tt>
<br><tt><font size=2>Saturn 5 etc.</font></tt>
<br>
<br><tt><font size=2>> Greenbelt, MD 20771</font></tt>
<br><tt><font size=2>> (301) 614-5751</font></tt>
<br>