Skip Menu |

This queue is for tickets about the Net-Appliance-Session CPAN distribution.

Report information
The Basics
Id: 62697
Status: resolved
Priority: 0/
Queue: Net-Appliance-Session

People
Owner: Nobody in particular
Requestors: steve [...] computurn.com
Cc:
AdminCc:

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



Subject: SSH.pm doesn't allow for cases where no password is needed
When using public/private key authentication, it is possible that no password or passphrase is needed, but SSH.pm assumes that a password is always required. I've attached an SSH.pm with a fix, and a diff file for the fix as well.
Subject: diff.txt
81c81 < (undef, $match) = $self->waitfor($self->pb->fetch('pass_prompt')) --- > $self->waitfor($self->pb->fetch('pass_prompt')) 85,91c85,87 < # Check that we have a password prompt before sending the password. < # We may have connected using public/private key authentication. < if ($match =~ eval 'qr'. $self->pb->fetch('pass_prompt')) { < # cannot cmd() here because sometimes there's a "helpful" < # login banner < $self->print($args{password}); < } --- > # cannot cmd() here because sometimes there's a "helpful" > # login banner > $self->print($args{password});
Subject: SSH.pm.gz
Download SSH.pm.gz
application/gzip 2.6k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #62697] SSH.pm doesn't allow for cases where no password is needed
Date: Sun, 07 Nov 2010 16:43:29 +0000
To: bug-Net-Appliance-Session [...] rt.cpan.org
From: Oliver Gorwits <oliver.gorwits [...] oucs.ox.ac.uk>
Hi Steve, On 04/11/2010 15:56, Steve Campbell via RT wrote: Show quoted text
> When using public/private key authentication, it is possible that no > password or passphrase is needed, but SSH.pm assumes that a password is > always required. > > I've attached an SSH.pm with a fix, and a diff file for the fix as well.
Many thanks for the patch, much appreciated. I just want to ask one thing, did you try calling the do_login(0) method before calling connect()? Did that not work, or were you looking for something more automatic than that? regards, oliver.
Subject: RE: [rt.cpan.org #62697] SSH.pm doesn't allow for cases where no password is needed
Date: Tue, 9 Nov 2010 15:29:35 -0000
To: <bug-Net-Appliance-Session [...] rt.cpan.org>
From: "Campbell, Steve" <Steve.Campbell [...] virginmedia.co.uk>
Oliver, I was using someone else's code. Digging down to find out where it was hanging, seemed to indicate a flaw in SSH.pm do_login(0) wasn't being used, but I'm all in favour of automation... Steve Show quoted text
-----Original Message----- From: oliver.gorwits@oucs.ox.ac.uk via RT [mailto:bug-Net-Appliance-Session@rt.cpan.org] Sent: 07 November 2010 16:44 To: steve@computurn.com Subject: Re: [rt.cpan.org #62697] SSH.pm doesn't allow for cases where no password is needed <URL: http://rt.cpan.org/Ticket/Display.html?id=62697 > Hi Steve, On 04/11/2010 15:56, Steve Campbell via RT wrote:
> When using public/private key authentication, it is possible that no > password or passphrase is needed, but SSH.pm assumes that a password > is always required. > > I've attached an SSH.pm with a fix, and a diff file for the fix as
well. Many thanks for the patch, much appreciated. I just want to ask one thing, did you try calling the do_login(0) method before calling connect()? Did that not work, or were you looking for something more automatic than that? regards, oliver. -------------------------------------------------------------------- Save Paper - Do you really need to print this e-mail? Visit www.virginmedia.com for more information, and more fun. This email and any attachments are or may be confidential and legally privileged and are sent solely for the attention of the addressee(s). If you have received this email in error, please delete it from your system: its use, disclosure or copying is unauthorised. Statements and opinions expressed in this email may not represent those of Virgin Media. Any representations or commitments in this email are subject to contract. Registered office: 160 Great Portland Street, London W1W 5QA. Registered in England and Wales with number 2591237
I've got a fix in the works for a new state machine which will detect the need for passwords. Many thanks for your patches and the issue report. -- regards, oliver.
Just to let you know I'm closing this ticket, as I've got a fix in the works for a new state machine which will detect the need for passwords. Many thanks for your patches and the issue report. -- regards, oliver.