ポート番号を間違える
…と、TCPのRSTをフィルタしていない場合、Connection refusedですよねぇ。
$ ssh -p 24 foo.example.com
ssh: connect to host foo.example.com port 24: Connection refused
ところが、時々、
$ ssh -p 24 bar.example.com
ssh: connect to host bar.example.com port 24: No route to host
となるんですよ。なんで? なんでなの??
tcpdump
しても、どちらもTCPのRSTが来ているだけで、全く差が無いのに…。
答え
$ telnet bar.example.com 24
Trying 192.0.2.1...
telnet: connect to address 192.0.2.1: Connection refused
Trying 2001:db8::1...
telnet: connect to address 2001:db8::1: No route to host
telnet: Unable to connect to remote host
AAAAあるのにv6が来ていない時、OpenSSHは、最後のエラーだけを表示している模様。
telnetは、途中経過も表示してくれるのね。