Nevermind. Figured it out using $ssh->shell() and $ssh->write in lieu of $ssh->exec
Thanks, Justin From: Af [mailto:[email protected]] On Behalf Of Justin Marshall Sent: Thursday, November 10, 2016 2:20 PM To: [email protected] Subject: Re: [AFMUG] UBNT S16 SNMP or Net::Telnet .... Taking your advice and trying Net::SSH2 Running into a problem that can’t seem to figure out though. The Sequence of commands I need to run is something like: [email protected]'s<mailto:[email protected]'s> password: (UBNT EdgeSwitch) >enable Password:******** (UBNT EdgeSwitch) #configure (UBNT EdgeSwitch) (Config)#interface 0/15 (UBNT EdgeSwitch) (Interface 0/15)#poe opmode passive24v The problem comes with that password directly after >enable I keep getting “Resource temporarily unavailable at test-ssh2.pl line 10.” Enabled debug, and it’s not extremely useful either (libssh2_channel_open_ex(ss->session, pv_channel_type, len_channel_type, window_size, packet_size, ((void *)0) , 0 ) -> 0x9b7d40) Ever encounter this scenario before, or know how to get around it? Thanks, Justin From: Af [mailto:[email protected]] On Behalf Of Cameron Crum Sent: Monday, November 07, 2016 4:03 PM To: [email protected]<mailto:[email protected]> Subject: Re: [AFMUG] UBNT S16 SNMP or Net::Telnet .... Try Net:SSH2 not just Net::SSH On Mon, Nov 7, 2016 at 2:43 PM, Josh Reynolds <[email protected]<mailto:[email protected]>> wrote: Do it via ansible / ssh. On Nov 7, 2016 2:41 PM, "Justin Marshall" <[email protected]<mailto:[email protected]>> wrote: It supports telnet and SSH. I remember having a bit of a time trying to install Net::SSH on the machine I need to run this on so I haven’t tried that yet. I actually just figured out if I set $t->errmode("return"); and have a 60 second timeout, my script now makes it all the way through. Just wish I could do this via SNMP so it would run in under 1-2 seconds as opposed to 1.5-2 minutes. Thanks, Justin From: Af [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Cameron Crum Sent: Monday, November 07, 2016 3:01 PM To: [email protected]<mailto:[email protected]> Subject: Re: [AFMUG] UBNT S16 SNMP or Net::Telnet .... Does it support straight Telnet? Have you tried Net::SSH2? On Mon, Nov 7, 2016 at 1:46 PM, Justin Marshall <[email protected]<mailto:[email protected]>> wrote: Hi, I’m looking for the SNMP OID’s for POE config on the UBNT EdgePoint S16. Specifically the ones that would let you disable/enable passive24v on a specific port. I tried an snmpwalk, but without a MIB there’s a lot to dig through. I actually found a thread on UBNT’s forums that say you have to retrieve them from the filesystem itself (https://community.ubnt.com/t5/EdgeMAX/SNMP-MIB-File/td-p/464763), but can’t figure out how to actually get at the filesystem. SSH & Telnet both yield “(UBNT EdgeSwitch) (Config)#” prompts with no real way to get underneath (unless it’s so obvious I’m just somehow missing it) Can anyone point me in the right direction? If not… Has anyone had luck with Net::Telnet and the Edgepoint S16? I’ve not been able to get a script to get past “configure” (nothing but timeouts, even when matching the specific prompt) Thanks, Justin [email protected]<mailto:[email protected]>
