perl
2 TopicsProblem with get_address() method
I'm having trouble figuring out how to get get_address() to return something other than an error and I'm assuming I'm doing something wrong but haven't had any luck figuring out what that is. The relevant code in Perl: my $request = SOAP::Lite -> uri('urn:iControl:LocalLB/NodeAddressV2') -> proxy("https://$bigip:$port/iControl/iControlPortal.cgi"); my $nodelist = $request->get_list(); my $nodeiplist = $request->get_address($nodelist); $request->get_list() returns the expected result but $request->get_address($nodelist) returns the following errors in SOAP::Lite: Argument "https://bigip_ip_address:port/iControl/iControlPortal.cgi" isn't numeric in sprintf at /path/to/perl/lib/SOAP/Lite.pm line 1033. Line 1033 in SOAP::Lite is: sub gen_id { sprintf "%U", $_[1] } Can anyone tell me what I'm probably doing wrong with my get_address() method call?221Views0likes3CommentsUnable to SSH to F5 Loadbalancer via perl script
I am trying to connect to F5 load balancer through perl module Net::SSH2. I am unable to authentication error, whereas with the same credentials I am able to ssh to the device through putty. I have shared the Code and the error below for reference. Could somebody please help me with this. use Net::SSH2; $deviceipF5 = "x.x.x.x"; $username = "xx"; $encrPass = "xx"; my @deviceipF5List = split(',',$deviceipF5); if(@deviceipF5List ne 0) { foreach my $deviceipF5(@deviceipF5List) { my @deviceipF5List1 = split (':', $deviceipF5); my $ssh2 = Net::SSH2->new(); $ssh2->debug(0); $ssh2->connect($deviceipF5List1[0]) or die $!; $ssh2->auth(username => $username, password => $encrPass) or die "Unable to login \n".$ssh2->die_with_error; print "Connected to '$deviceipF5List1[0]' as '$username' \n"; my $channel = $ssh2->channel() or do { print "Unable to create channnel ssh channel to Device $deviceipF5List[0]";$ssh2->disconnect(); last;}; $channel->blocking(0); $channel->shell() ; print "SSH Success \n"; sleep(2); I have even tried to useauth_passwordinstead of auth but no Luck. Below is the error I am getting:Bad file descriptor at line 16 I tried removing $1 from line number 16 but it lead to another error:Died at line 16 Also, in the development environment, I'm able to login to the device and fetch output via this script, but not in the client environment.551Views0likes3Comments