[erlang-bugs] R13B04: ssh:connect to an IPv6 address doesn't work

Kenji Rikitake <>
Mon Mar 22 12:34:40 CET 2010


Hello Niclas: you're right on the reversed ip_v6_disabled option.
My sshrpc code worked OK when ip_v6_disabled is set to *true*.
A confirmation and FYI.
Kenji Rikitake

In the message <>
dated Mon, Mar 22, 2010 at 10:42:04AM +0100,
Niclas Eklund <> writes:
> Hello!
> 
> It looks like you've found a bug.
> 
> %% ssh:connect/4
> 
>     DisableIpv6 =  proplists:get_value(ip_v6_disabled, Opts, false),
>     Inet = inetopt(DisableIpv6),
> 
> Which invokes the local function:
> 
> inetopt(true) ->
>     inet6;
> inetopt(false) ->
>     inet.
> 
> I.e, the return values have been mixed up. If you try the following it 
> should work for you:
> 
>  erl> ssh:connect("::1", 22, [{ip_v6_disabled, true}]).
> 
> But this needs to be sorted out in the SSH application.
> 
> /Niclas @ Erlang/OTP
> 
> On Sun, 21 Mar 2010, Kenji Rikitake wrote:
> 
> >A simple call to
> >ssh:connect("::1", 22, [])
> >fails with
> >{error, nxdomain}
> >
> >I suspect something wrong with choosing the Callback variable
> >in ssh_transport:do_connect/5, but no further tracking so far.
> >
> >Kenji Rikitake


More information about the erlang-bugs mailing list