I'm trying, without success, connect to a local network ssh server from macOS by doing:
$ ssh user@1111:ab1:123:ab1:011b:12bc:ab12:1a2b
and then I get:
ssh: connect to host 1111:ab1:123:ab1:011b:12bc:ab12:1a2b port 22: Network is down
I actually can connect to that server from iPhone app Termius (and there are also other reasons to think the server side is ok) so I believe there is a problem on the client side. I tried that same app on macOS without success.
Also, ssh to a virtual machine works well, as well as to an amazon aws server.
Also tried verbose:
$ ssh user@1111:ab1:123:ab1:011b:12bc:ab12:1a2b -vvv
OpenSSH_7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 1111:ab1:123:ab1:011b:12bc:ab12:1a2b port 22.
ssh: connect to host 1111:ab1:123:ab1:011b:12bc:ab12:1a2b port 22: Network is down
And IPV6:
$ ssh -6 -vvv user@1111:ab1:123:ab1:011b:12bc:ab12:1a2b
OpenSSH_7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 1111:ab1:123:ab1:011b:12bc:ab12:1a2b port 22.
ssh: connect to host 1111:ab1:123:ab1:011b:12bc:ab12:1a2b port 22: Network is down
And ping:
$ ping 1111:ab1:123:ab1:011b:12bc:ab12:1a2b
ping: cannot resolve 1111:ab1:123:ab1:011b:12bc:ab12:1a2b: Unknown host
What might be causing the Network is down
? How should I debug this?
Best Answer
SSH is just the messenger, and is likely calling
strerror(3)
or equivalent on a bad exit code from some socket call:If we dig around in the system man pages for
ENETDOWN
this will turn up documentation...Though not much as
connect(2)
orintro(2)
merely indicateIs IPv6 working on this host? You'll probably need to debug with
ping6
(notping
) and maybe check the IPv6 settings via some clicky interface or insteadifconfig
andnetstat -rn
.To avoid the GUI, the network settings for IPv6 can be adjusted with something like
see the
ipconfig(8)
manual for details.