Hi,

Recently I encountered a diagnostics issue while trying o connect to an
IPV6 capable machine from a machine in a IPV4 only network with SSH.

If for some reason the IPV4 connection fails it then tries the IPV6 adress
which will expectedly fail. The only diagnostic message shown is the IPV6
reason while the IPV4 failure reason is not shown.

(problem om the IPV6 machine is simulated by using a port where nothing
runs as the issues which lead to the discovery have been fixed there)

$ ssh snail.stack.nl -p 999
ssh: connect to host snail.stack.nl port 999: No route to host

Going verbose does show the full set of errors. 

$ ssh -v snail.stack.nl -p 999
OpenSSH_5.2, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /home/janjaap/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to snail.stack.nl [131.155.140.131] port 999.
debug1: connect to address 131.155.140.131 port 999: Connection refused
debug1: Connecting to snail.stack.nl [2001:610:1108:5010::131] port 999.
debug1: connect to address 2001:610:1108:5010::131 port 999: No route to host
ssh: connect to host snail.stack.nl port 999: No route to host

This is probably some fallout from the change in IPV6 and IPV4 order
recently. Before the swap the IPV4 error was the last error and therefore
shown. 

Imho, while the IPV6 error is correct for the IPV6 case, the IPV4 error 
seems to me to be more relevant than the IPV6 error in this case.

In comparison, telnet just shows both errors:

$ telnet snail.stack.nl 999
Trying 131.155.140.131...
telnet: connect to address 131.155.140.131: Connection refused
Trying 2001:610:1108:5010::131...
telnet: connect to address 2001:610:1108:5010::131: No route to host

        Janjaap van Velthooven
--  ________________________________________
   / __/ /_    / ______/ /_  __/ __/ /___  / 
  / /_  __/___/_/_  /___  / / __/ /___  / /          janj...@stack.nl
 /___/_/_________/_____/_/_/_/_______/_/_/        

Reply via email to