Skip Menu |

This queue is for tickets about the Net-SSH-Expect CPAN distribution.

Report information
The Basics
Id: 73979
Status: open
Priority: 0/
Queue: Net-SSH-Expect

People
Owner: Nobody in particular
Requestors: kumar.rajesh [...] wipro.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Perl SSH Expect send result varies from manual execution
Date: Fri, 13 Jan 2012 15:48:30 +0000
To: <bug-Net-SSH-Expect [...] rt.cpan.org>
From: <kumar.rajesh [...] wipro.com>
Hi, Greetings, I am having an issue in perl (SSH::Expect) where I need some help with the interactive menu selection (perl case attached). It works fine manually but fails with perl ssh expect. When executing manually i get the following: |---------------------------------------------| | 1. Create task | | 2. Start task | | 3. Pause task | | 4. Delete task | | 5. Query task | | 6. Save message | |---------------------------------------------| | 7. Exit | |---------------------------------------------| Please enter the operation serial number. >1 Incorrect number. Please enter a correct one. >1 NO. NE name NE type name 1 TB2SEE HW_SEE 2 UKTB2SEE HW_SEE 3 TB2SLEE HW_SLEE 4 UKTB2SLEE HW_SLEE ***************Input Tips************* a: To create a tracing task for an NE, enter the NE number. b: To create a tracing task for multiple NEs, enter the NE numbers and separate every two of them with a plus sign (+). Example: 1+2. c: To create a tracing task for all NEs, enter 0. ************************************** Please enter the NE serial number. > but when i run it from perl automated script i get the following: DB<1> main::(iTrace_start_stop.pl:50): $ssh->waitfor('Please\senter\sthe\soperation\sserial\snumber.\s*', 2) or die "prompt 'operation serial number' not found after 2 second"; DB<1> main::(iTrace_start_stop.pl:51): $ssh->send("1"); DB<1> main::(iTrace_start_stop.pl:54): print $ssh->peek(1); DB<1> Show quoted text
>
NO.NE nameNE type name ---- More (Enter to show More) ---- NO.NE nameNE type name ---- More (Enter to show More) ---- NO.NE nameNE type name ---- More (Enter to show More) ---- That is it only prints the first line of the table but not the whole content. Somehow the table is not coming properly from the server and it is not taking any further input. Please let me know if you have faced such issues so that i can fix this based on the experience. Thanks, Rajesh Kumar Bathina Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #73979] Perl SSH Expect send result varies from manual execution
Date: Sun, 15 Jan 2012 11:44:10 -0200
To: bug-Net-SSH-Expect [...] rt.cpan.org
From: Bruno Negrao Zica <bnegrao [...] gmail.com>
Hello Kumar, I believe that is because your server doesn't get the same terminal settings when it receives the ssh request via perl expect. Your server understands that the client screen is smaller so it sends that message " ---- More (Enter to show More) ----". Well, i have no idea on how would you fix the client terminal settings, so what I would do is configure ssh-perl-expect to send ENTER whenever it receives a "---- More (Enter to show More) ----" string. hope that helps. bruno. On Fri, Jan 13, 2012 at 1:48 PM, kumar.rajesh via RT < bug-Net-SSH-Expect@rt.cpan.org> wrote: Show quoted text
> Fri Jan 13 10:48:45 2012: Request 73979 was acted upon. > Transaction: Ticket created by kumar.rajesh@wipro.com > Queue: Net-SSH-Expect > Subject: Perl SSH Expect send result varies from manual execution > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: kumar.rajesh@wipro.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73979 > > > > Hi, > > Greetings, > > I am having an issue in perl (SSH::Expect) where I need some help with the > interactive menu selection (perl case attached). It works fine manually but > fails with perl ssh expect. When executing manually i get the following: > > > |---------------------------------------------| > | 1. Create task | > | 2. Start task | > | 3. Pause task | > | 4. Delete task | > | 5. Query task | > | 6. Save message | > |---------------------------------------------| > | 7. Exit | > |---------------------------------------------| > > Please enter the operation serial number. >1 > Incorrect number. Please enter a correct one. >1 > > NO. NE name > NE type name > 1 TB2SEE > HW_SEE > 2 UKTB2SEE > HW_SEE > 3 TB2SLEE > HW_SLEE > 4 UKTB2SLEE > HW_SLEE > > ***************Input Tips************* > a: To create a tracing task for an NE, enter the NE number. > b: To create a tracing task for multiple NEs, enter the NE numbers and > separate every two of them with a plus sign (+). Example: 1+2. > c: To create a tracing task for all NEs, enter 0. > ************************************** > Please enter the NE serial number. > > > > but when i run it from perl automated script i get the following: > > > > DB<1> > main::(iTrace_start_stop.pl:50): > $ssh->waitfor('Please\senter\sthe\soperation\sserial\snumber.\s*', 2) or > die "prompt 'operation serial number' not found after 2 second"; > DB<1> > main::(iTrace_start_stop.pl:51): $ssh->send("1"); > DB<1> > main::(iTrace_start_stop.pl:54): print $ssh->peek(1); > DB<1>
> >
> > NO.NE nameNE type name > ---- More (Enter to show More) ---- > NO.NE nameNE type name > ---- More (Enter to show More) ---- > NO.NE nameNE type name > ---- More (Enter to show More) ---- > > That is it only prints the first line of the table but not the whole > content. > > Somehow the table is not coming properly from the server and it is not > taking any further input. Please let me know if you have faced such issues > so that i can fix this based on the experience. > > Thanks, > Rajesh Kumar Bathina > > Please do not print this email unless it is absolutely necessary. > > The information contained in this electronic message and any attachments > to this message are intended for the exclusive use of the addressee(s) and > may contain proprietary, confidential or privileged information. If you are > not the intended recipient, you should not disseminate, distribute or copy > this e-mail. Please notify the sender immediately and destroy all copies of > this message and any attachments. > > WARNING: Computer viruses can be transmitted via email. The recipient > should check this email and any attachments for the presence of viruses. > The company accepts no liability for any damage caused by any virus > transmitted by this email. > > www.wipro.com > >
Subject: RE: [rt.cpan.org #73979] Perl SSH Expect send result varies from manual execution
Date: Mon, 16 Jan 2012 08:40:20 +0000
To: <bug-Net-SSH-Expect [...] rt.cpan.org>
From: <kumar.rajesh [...] wipro.com>
Hi Bruno, Greetings, I have already tried Enter (\n) when i get the message "Enter to show more" and it did not help. Thanks and Regards, Rajesh Kumar Bathina Show quoted text
________________________________________ From: Bruno Negrao via RT [bug-Net-SSH-Expect@rt.cpan.org] Sent: Sunday, January 15, 2012 7:14 PM To: Rajesh Kumar Bathina (WT01 - GMT-Global Comm Service Provider) Subject: Re: [rt.cpan.org #73979] Perl SSH Expect send result varies from manual execution <URL: https://rt.cpan.org/Ticket/Display.html?id=73979 > Hello Kumar, I believe that is because your server doesn't get the same terminal settings when it receives the ssh request via perl expect. Your server understands that the client screen is smaller so it sends that message " ---- More (Enter to show More) ----". Well, i have no idea on how would you fix the client terminal settings, so what I would do is configure ssh-perl-expect to send ENTER whenever it receives a "---- More (Enter to show More) ----" string. hope that helps. bruno. On Fri, Jan 13, 2012 at 1:48 PM, kumar.rajesh via RT < bug-Net-SSH-Expect@rt.cpan.org> wrote:
> Fri Jan 13 10:48:45 2012: Request 73979 was acted upon. > Transaction: Ticket created by kumar.rajesh@wipro.com > Queue: Net-SSH-Expect > Subject: Perl SSH Expect send result varies from manual execution > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: kumar.rajesh@wipro.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73979 > > > > Hi, > > Greetings, > > I am having an issue in perl (SSH::Expect) where I need some help with the > interactive menu selection (perl case attached). It works fine manually but > fails with perl ssh expect. When executing manually i get the following: > > > |---------------------------------------------| > | 1. Create task | > | 2. Start task | > | 3. Pause task | > | 4. Delete task | > | 5. Query task | > | 6. Save message | > |---------------------------------------------| > | 7. Exit | > |---------------------------------------------| > > Please enter the operation serial number. >1 > Incorrect number. Please enter a correct one. >1 > > NO. NE name > NE type name > 1 TB2SEE > HW_SEE > 2 UKTB2SEE > HW_SEE > 3 TB2SLEE > HW_SLEE > 4 UKTB2SLEE > HW_SLEE > > ***************Input Tips************* > a: To create a tracing task for an NE, enter the NE number. > b: To create a tracing task for multiple NEs, enter the NE numbers and > separate every two of them with a plus sign (+). Example: 1+2. > c: To create a tracing task for all NEs, enter 0. > ************************************** > Please enter the NE serial number. > > > > but when i run it from perl automated script i get the following: > > > > DB<1> > main::(iTrace_start_stop.pl:50): > $ssh->waitfor('Please\senter\sthe\soperation\sserial\snumber.\s*', 2) or > die "prompt 'operation serial number' not found after 2 second"; > DB<1> > main::(iTrace_start_stop.pl:51): $ssh->send("1"); > DB<1> > main::(iTrace_start_stop.pl:54): print $ssh->peek(1); > DB<1>
> >
> > NO.NE nameNE type name > ---- More (Enter to show More) ---- > NO.NE nameNE type name > ---- More (Enter to show More) ---- > NO.NE nameNE type name > ---- More (Enter to show More) ---- > > That is it only prints the first line of the table but not the whole > content. > > Somehow the table is not coming properly from the server and it is not > taking any further input. Please let me know if you have faced such issues > so that i can fix this based on the experience. > > Thanks, > Rajesh Kumar Bathina > > Please do not print this email unless it is absolutely necessary. > > The information contained in this electronic message and any attachments > to this message are intended for the exclusive use of the addressee(s) and > may contain proprietary, confidential or privileged information. If you are > not the intended recipient, you should not disseminate, distribute or copy > this e-mail. Please notify the sender immediately and destroy all copies of > this message and any attachments. > > WARNING: Computer viruses can be transmitted via email. The recipient > should check this email and any attachments for the presence of viruses. > The company accepts no liability for any damage caused by any virus > transmitted by this email. > > www.wipro.com > >
Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com