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?

link|improve this question
What was the error message when you tried "ssh -p 9223 remote_ip"? – Khaled Dec 4 '10 at 7:59
feedback

1 Answer

up vote 6 down vote accepted

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

link|improve this answer
That's it. Thanks. – Mike Douglas Dec 4 '10 at 8:06
Glad I could help. – Casual Coder Dec 4 '10 at 8:07
How is IPv6 related? O_o – poige Feb 3 '11 at 3:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.