Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: me [...] marcosg.com
Cc:
AdminCc:

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



Subject: Issue with Palo Alto Device. Connection drops.
Date: Mon, 20 Jul 2015 16:49:07 +1000
To: bug-Net-Appliance-Session [...] rt.cpan.org
From: Marcos Georgopoulos <me [...] marcosg.com>
Hi, I am trying to use your library to connect to a Palo Alto Firewall device. I can connect fine however issuing a command seems to cause the connection to close. However as far as the device is concerned the session is still connected. Here is the output of my debug when trying to log in and issue a command 'show interface management' [ 0.009087] pr finding prompt [ 0.012640] tr creating Net::Telnet wrapper for ssh [ 0.014011] tr connecting with: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -l admin 172.16.118.119 Warning: Permanently added '172.16.118.119' (RSA) to the list of known hosts. [ 0.393653] ph reading phrasebook /usr/local/share/perl/5.18.2/Net/CLI/Interact/phrasebook/cisco/pb [ 0.394259] ph storing prompt generic [ 0.398026] ph storing prompt basic [ 0.398248] ph storing prompt privileged [ 0.398453] ph storing prompt configure [ 0.398737] ph storing prompt user [ 0.398953] ph storing prompt pass [ 0.399157] ph storing prompt prompt [ 0.399371] ph storing macro begin_privileged [ 0.399941] ph storing macro end_privileged [ 0.400181] ph storing macro begin_configure [ 0.400413] ph storing macro end_configure [ 0.400644] ph storing macro disconnect [ 0.400965] pr nope, doesn't (yet) match privileged [ 0.401090] pr nope, doesn't (yet) match configure [ 0.401208] pr nope, doesn't (yet) match basic [ 0.401343] pr nope, doesn't (yet) match prompt [ 0.401460] pr nope, doesn't (yet) match pass [ 0.401593] pr nope, doesn't (yet) match generic [ 0.401715] pr nope, doesn't (yet) match user [ 0.401816] pr no match so far, more data? [ 0.428824] du SEEN: Warning: Permanently added '172.16.118.119' (RSA) to the list of known hosts. Password: [ 0.429082] pr nope, doesn't (yet) match privileged [ 0.429208] pr nope, doesn't (yet) match configure [ 0.429326] pr nope, doesn't (yet) match basic [ 0.429463] pr nope, doesn't (yet) match prompt [ 0.429583] pr hit, matches prompt pass [ 0.430179] pr prompt has been set to (?^:[Pp]assword: ?$) [ 0.432026] pr output matching prompt was "Password: " [ 0.432228] di trimmed command response: Warning: Permanently added '172.16.118.119' (RSA) to the list of known hosts. [ 0.433138] pr finding prompt [ 0.433342] du SEEN: [ 0.433467] pr nope, doesn't (yet) match privileged [ 0.433584] pr nope, doesn't (yet) match configure [ 0.433700] pr nope, doesn't (yet) match basic [ 0.433813] pr nope, doesn't (yet) match prompt [ 0.433926] pr nope, doesn't (yet) match pass [ 0.434040] pr nope, doesn't (yet) match generic [ 0.434154] pr nope, doesn't (yet) match user [ 0.434245] pr no match so far, more data? [ 0.450952] du SEEN: Last login: Sun Jul 19 23:39:27 2015 from 172.16.118.115 [ 0.451194] pr nope, doesn't (yet) match privileged [ 0.451348] pr nope, doesn't (yet) match configure [ 0.451473] pr nope, doesn't (yet) match basic [ 0.451623] pr nope, doesn't (yet) match prompt [ 0.451774] pr nope, doesn't (yet) match pass [ 0.451943] pr nope, doesn't (yet) match generic [ 0.452059] pr nope, doesn't (yet) match user [ 0.452167] pr no match so far, more data? [ 1.072714] du SEEN: Last login: Sun Jul 19 23:39:27 2015 from 172.16.118.115 Welcome admin. [ 1.072957] pr nope, doesn't (yet) match privileged [ 1.073066] pr nope, doesn't (yet) match configure [ 1.073187] pr nope, doesn't (yet) match basic [ 1.073314] pr nope, doesn't (yet) match prompt [ 1.073419] pr nope, doesn't (yet) match pass [ 1.073539] pr nope, doesn't (yet) match generic [ 1.073643] pr nope, doesn't (yet) match user [ 1.073722] pr no match so far, more data? [ 1.318642] du SEEN: Last login: Sun Jul 19 23:39:27 2015 from 172.16.118.115 Welcome admin. admin@PA-3020> [ 1.318892] pr nope, doesn't (yet) match privileged [ 1.319002] pr nope, doesn't (yet) match configure [ 1.319113] pr hit, matches prompt basic [ 1.319222] pr prompt has been set to (?^:> ?$) [ 1.319646] pr output matching prompt was "admin@PA-3020> " [ 1.319814] di trimmed command response: Last login: Sun Jul 19 23:39:27 2015 from 172.16.118.115 Welcome admin. [ 1.324264] en running command show interface management [ 1.324434] en executing actions [ 1.325430] en dispatching to execute method [ 1.327353] tr callback received for send [ 1.327810] di queueing data for send: "show interface management" [ 1.328053] tr callback received for match [ 1.348550] du SEEN: show interface management [ 1.348808] tr nope, doesn't (yet) match (?^:> ?$) [ 1.364072] du SEEN: Connection to 172.16.118.119 closed. [ 1.364362] tr nope, doesn't (yet) match (?^:> ?$) read error: Input/output error at /usr/local/share/perl/5.18.2/Net/CLI/Interact/Transport/Wrapper/Net_Telnet.pm line 35 When I log in via putty, here is the expected output login as: admin Using keyboard-interactive authentication. Password: Last login: Sun Jul 19 23:42:34 2015 from 172.16.118.115 Welcome admin. admin@PA-3020> show interface management ------------------------------------------------------------------------------- Name: Management Interface Link status: Runtime link speed/duplex/state: 100/full/up Configured link speed/duplex/state: auto/auto/auto MAC address: Port MAC address 00:1b:17:ab:ac:c0 Ip address: 172.16.118.119 Netmask: 255.255.255.0 Default gateway: 172.16.118.254 Ipv6 address: unknown Ipv6 link local address: unknown Ipv6 default gateway: unknown ------------------------------------------------------------------------------- I'm not sure how to troubleshoot this further. Many thanks.
Hi, Well, it looks like a genuine disconnect from the SSH side: "Connection to 172.16.118.119 closed.". However you could try the Net::OpenSSH module instead of the Net::TELNET wrapper to openssh. Set the "transport" option to "Net_OpenSSH" and it should be enough. -- regards, oliver.
Subject: Re: [rt.cpan.org #105973] Issue with Palo Alto Device. Connection drops.
Date: Fri, 24 Jul 2015 14:37:58 +1000
To: bug-Net-Appliance-Session [...] rt.cpan.org
From: Marcos Georgopoulos <me [...] marcosg.com>
Thank you very much for that. I am trying to use the Net_OpenSSH option however I when I set the 'transport' to 'Net_OpenSSH' I get the following error when trying to connect; "coercion for "connect_options" failed: Missing required argument: master at (eval 609) line 55. I've read through the CPAN documentation but cannot work out what I am doing wrong. Do you have an example of how to use the 'Net_OpenSSH' option? thank you. On Fri, Jul 24, 2015 at 7:23 AM, Oliver Gorwits via RT < bug-Net-Appliance-Session@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=105973 > > > Hi, > > Well, it looks like a genuine disconnect from the SSH side: "Connection to > 172.16.118.119 closed.". > > However you could try the Net::OpenSSH module instead of the Net::TELNET > wrapper to openssh. > > Set the "transport" option to "Net_OpenSSH" and it should be enough. > > -- > regards, > oliver. >