Bug 217272 - AddressFamily inet6 doesn't force ipv6
AddressFamily inet6 doesn't force ipv6
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: openssh (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-11-26 05:10 EST by Matthew Booth
Modified: 2007-11-16 20:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-28 15:01:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthew Booth 2006-11-26 05:10:01 EST
Description of problem:
I have the following in .ssh/config:

Host gideon *.revolutionwall.net
AddressFamily inet6
User matthew

However, the following uses IPv4:
[mbooth@mbooth ~]$ ssh gideon
Last login: Sun Nov 26 10:03:37 2006 from xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
[matthew@gideon ~]$ who
matthew  pts/0        Nov 26 10:03 (ezekiel.revolutionwall.net)

To use IPv6 I must specify the -6 option to ssh:
[mbooth@mbooth ~]$ ssh -6 gideon
Last login: Sun Nov 26 10:03:40 2006 from ezekiel.revolutionwall.net
[matthew@gideon ~]$ who
matthew  pts/0        Nov 26 10:04 (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx)

The man page for ssh_config suggests this should not be the case:
             Specifies which address family to use when connecting.  Valid
             arguments are “any”, “inet” (Use IPv4 only) or “inet6” (Use IPv6

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a network with both IPv4 and IPv6 connectivity
2. Assign both A and AAAA records for the target host
3. Specify AddressFamily inet6 in ~/.ssh/config for that host
4. ssh to the host with no arguments

Actual results:
ssh uses IPv4

Expected results:
ssh uses IPv6
Comment 1 Tomas Mraz 2006-11-28 12:43:03 EST
I'm sorry but I cannot reproduce this problem here. It works fine on two
machines here with the same openssh version.

Looking at the source I don't see any obvious problem with setting the address
family either.

Can you provide ssh -vvv host log when it doesn't work as expected?
Comment 2 Matthew Booth 2006-11-28 14:08:01 EST
I found an errant:

AddressFamily inet

further up in my .ssh/config. This is my error. It's now working as expected.

Note You need to log in before you can comment on or make changes to this bug.