2

I'm not a server guy, and my network skills are a little rusty, so this may be a simple question. On a brand-new archlinux machine, I setup sshd, and told it to bind to 0.0.0.0:9223. Once it was running, I used netstat to confirm that it was listening on *:9223.

Running "ssh -p 9223 localhost" connected fine, but remote connections failed. I then tried "ssh -p 9223 [REMOTE_IP]" on the server, and this failed.

After trying to find the source of the problem, and failing, I set sshd to bind to [REMOTE_IP], and suddenly everything worked.

So my question is, what would cause a socket bound to 0.0.0.0 to ignore connections from the ip address of the eth0 interface?

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
Mike Douglas
  • 123
  • 1
  • 5

1 Answers1

7

The case might be that your eth0 interface is using IPv6 protocol. When you configure ssh server with ListenAddress 0.0.0.0 in /etc/ssh/sshd_config you turned off IPv6 protocol. netstat then have only one entry for ssh starting with tcp. Add a line ListenAddress :: to also listen on tcp6. netstat should report you two entries for ssh server one on tcp6 :::9223 and one on tcp 0.0.0.0:9223

Casual Coder
  • 1,216
  • 1
  • 11
  • 12