Bug 1941

Summary: ssh -6 prevents ipv4 forwarding
Product: Portable OpenSSH Reporter: gmccullagh
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WORKSFORME    
Severity: minor CC: djm
Priority: P2    
Version: 5.8p1   
Hardware: ix86   
OS: Linux   

Description gmccullagh 2011-10-05 09:36:04 AEDT
when I use either of

  ssh -CX -L 10443:172.20.0.1:443 <hostname>
  ssh -4CX -L 10443:172.20.0.1:443 <hostname>

where <hostname> has both a functioning A and AAAA record, I can connect and use the port forward.  However, if I use:

  ssh -6CX -L 10443:172.20.0.1:443 <hostname>

I can't connect to the tunnel because seemingly the -6 prevents use of an IPv4 address in any context.  

I had imagined the -4 and -6 were there to dictate what way ssh connects only.  Apparently that was a misreading on my part but it would be preferable to be able to separate the preference for an IPv4/v6 ssh connection from the IP version used in any forwarded connections.
Comment 1 Damien Miller 2019-01-23 20:15:10 AEDT
This is working as intended. The documentation for -4/-6 say that they force ssh to use only IPv4/IPv6 addresses and that is what it is doing.

These options are big hammers that are mostly intended for debugging as a crutch when the network is broken.
Comment 2 Damien Miller 2019-05-03 14:42:38 AEST
Move resolved bugs -> CLOSED after 8.0 release