Skip Menu |

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

Report information
The Basics
Id: 75898
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Net-OpenSSH

People
Owner: salva [...] cpan.org
Requestors: avzdnb [...] gmail.com
Cc:
AdminCc:

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



Subject: IPv6 addresses shouldn't be squared
ENV: perl -v This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi Ubuntu 10.04.4 Net::OpenSSH 0.57 DESC: I'm trying to connect to a host via IPv6 according to the manual: #!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Net::OpenSSH; $| = 1; my $ip = '2002:5bcc:18fd:c:xxx'; my $ssh = Net::OpenSSH->new('root@'.$ip); # IPv6 $ssh->error and die "Couldn't establish SSH connection: ". $ssh->error; ssh: Could not resolve hostname [2002:5bcc:18fd:c:xxx]: Name or service not known Couldn't establish SSH connection: unable to establish master SSH connection: master process exited unexpectedly This is because openssh recognizes ipv6 addresses in squares as hostnames and tries to resolve them. Probably it's a openssh bug: ssh root@2002:5bcc:18fd:c:xxx "pwd" # works ssh root@[2002:5bcc:18fd:c:xxx] "pwd" # doesn't Net::OpenSSH shouldn't put ipv6 hosts in squares in (at least until it's fixed in openssh): if (defined $ipv6) { ($host) = $ipv6 =~ /^\[?(.*?)\]?$/; $host_squared = "[$host]"; } else { $host_squared = $host; }
Solved in the 0.58_03 version I have just uploaded to CPAN. Thank you for reporting the bug!