<div dir="ltr">I should have mentioned that I tried clogin after changing the sleep time to 3 as I use clogin for all my other HP switches and have had the most success with clogin. I have just tried the hlogin script with the amended sleep entry. The script will log onto the switch and then output terminal garbage, if I then press any keys like the arrow keys, etc, more garbage is echoed back to the screen. This tells me that it has entered a terminal mode but one which the switch doesn't recognise. As I say, clogin is much more successful and despite issuing a random terminal letter/symbol/number sequence as soon as it logs on, I am still left with a logged in and responsive terminal.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 September 2014 21:03, Per-Olof Olsson <span dir="ltr"><<a href="mailto:peo@chalmers.se" target="_blank">peo@chalmers.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br>
<br>
Have someone tested to extend the time, device and tty driver have to negotiate<br>
window size at login, before expect start to analyze text?<br>
<br>
Seems to work if I use "sleep 3"<br>
<br>
*** hlogin_ORG 2014-09-12 21:38:09.543395741 +0200<br>
--- hlogin 2014-09-12 21:39:58.679120629 +0200<br>
...<br>
***************<br>
*** 361,367 ****<br>
send_user "\nError: unknown connection method: $prog\n"<br>
return 1<br>
}<br>
! sleep 0.3<br>
<br>
# This helps cleanup each expect clause.<br>
expect_after {<br>
--- 404,410 ----<br>
send_user "\nError: unknown connection method: $prog\n"<br>
return 1<br>
}<br>
! sleep 3<br>
<br>
# This helps cleanup each expect clause.<br>
expect_after {<br>
***************<br>
...<br>
<br>
clogin to HP-switches...<br>
Anyhow, tests using "sleep 3" seems to eliminate window size echo, even for clogin to HPs.<br>
<br>
<br>
/Peo<br>
<br>
<br>
Neil Arnold wrote 2014-09-12 17:03:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi Jon,<br>
<br>
Ok, that makes sense. I've tried the following:<br>
<br>
TERM="" hlogin 10.100.20.149<br>
Result: Logged in but can't issue any command and the following displayed in the console: ^[[36;116R<br>
<br>
TERM="" clogin 10.100.20.149<br>
Result: Log in successful but ^[[36;116R is automatically issued to the switch (different to the original string but still stalls<br>
the config grab)<br>
<br>
<br></span><span class="">
On 12 September 2014 15:56, Jon Lewis <<a href="mailto:jlewis@lewis.org" target="_blank">jlewis@lewis.org</a> <mailto:<a href="mailto:jlewis@lewis.org" target="_blank">jlewis@lewis.org</a>>> wrote:<br>
<br>
With bash being my shell, I've just been doing TERM="" before using clogin on aristas. After seeing heasley's response, I did<br>
a little testing, and vt100 seems to work as well. My native TERM was "screen" since I like to use screen, it results in<br>
display similar to what you posted and an "n" spit out as if typed.<br>
<br>
<br>
On Fri, 12 Sep 2014, Neil Arnold wrote:<br>
<br>
Hi Jethro, I've tried the hlogon too. No luck I'm afraid.<br>
<br>
John, this sounds like it could be the solution as the characters do look<br>
like terminal output. Can you explain how I would go about clearing the<br>
TERM environment and if this works, I'm assuming I would have to make a<br>
seperate cron job running clogin with these new parameters just for these<br>
problem switches?<br>
<br>
Thanks again for you help with this.<br>
<br>
<br></span><span class="">
On 12 September 2014 13:03, Jon Lewis <<a href="mailto:jlewis@lewis.org" target="_blank">jlewis@lewis.org</a> <mailto:<a href="mailto:jlewis@lewis.org" target="_blank">jlewis@lewis.org</a>>> wrote:<br>
<br>
On Fri, 12 Sep 2014, Neil Arnold wrote:<br>
<br>
Hi,<br>
<br>
<br>
I've got an issue with 3 HP Procurve switches. All are running a recent<br>
firmware version. The problem is that no config is being pulled from 3 HP<br>
switches. in my network, the others give up their config just fine. I've<br>
discovered the reason but I'm unsure of how to fix it.<br>
The issue is caused because rancid is issuing the following command to the<br>
switch after it logs on: ^[[46;148R<br>
<br>
I can see this by running /bin/clogin 10.100.20.149 and seeing that I get<br>
dropped to the following:<br>
<br>
HP_SWITCH_1# ^[[46;148R<br>
HP_SWITCH_1#<br>
<br>
So Rancid is issuing the manager username and password and then issuing<br>
^[[46;148R which the switch doesn't understand, Rancid, having not<br>
received<br>
<br>
<br>
I have similar problems with clogin and arista gear. In this case, it's<br>
solved by clearing the TERM environment variable before running clogin.<br>
<br></span>
------------------------------<u></u>__----------------------------<u></u>--__----------<span class=""><br>
Jon Lewis, MCP :) | I route<br>
| therefore you are<br></span>
_________ <a href="http://www.lewis.org/~jlewis/__pgp" target="_blank">http://www.lewis.org/~jlewis/_<u></u>_pgp</a> <<a href="http://www.lewis.org/~jlewis/pgp" target="_blank">http://www.lewis.org/~jlewis/<u></u>pgp</a>> for PGP public key_________<br>
<br>
<br>
<br>
------------------------------<u></u>__----------------------------<u></u>--__----------<span class=""><br>
Jon Lewis, MCP :) | I route<br>
| therefore you are<br></span>
_________ <a href="http://www.lewis.org/~jlewis/__pgp" target="_blank">http://www.lewis.org/~jlewis/_<u></u>_pgp</a> <<a href="http://www.lewis.org/~jlewis/pgp" target="_blank">http://www.lewis.org/~jlewis/<u></u>pgp</a>> for PGP public key_________<span class=""><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
<br>
</span></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
______________________________<u></u>_________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
</div></div></blockquote></div><br></div>