View Full Version : YAT: (ssh) Bind to port 22 on failed: but why!?

20th December 2006, 09:48 AM
Hi Folks,

I've recently found I have the lovely

Bind to port 22 on failed: Address already in use

error message in my secure.log file and I can no longer ssh in from the outside world. All is fine ssh'ing from my local network.

Now, I've checked out the other threads on the topic and suspect its the IPv6 issue but I wanted to ask how I can track down the cause of it. You see, the funny thing is I don't think I've changed anything on my box, it just stopped working one day.

Well, in fact, I *may* have run an update on one machine but this is now happening on two machines (both on port 22 but with my router configured with port forwarding).

So, where / how can I find out the cause? Any clues?

How about the IPv6 issue? I don't think I'm using it, but how can I be sure? I *think* it was all setup for me, so for example, when I do an ifconfig it shows two ip addresses (one v4 on v6) and I thought the two just lived happily together? Any references I can check out?

Anyway, thanks for your help as I'm just trying to understand whats going on!


20th December 2006, 10:04 AM

Personally, I don't think that the message you are seeing is an indication of a problem. See, I have that message appearing in the secure log every time I start sshd, but I still can connect to my box from the outside world and everything seems to work just fine. So I don't think that the message is indicating any problem. What does netstat -ap say about port 22? Is your firewall set up to allow connections to port 22 on all interfaces?

20th December 2006, 10:16 AM

Thanks, I'll check out those settings (when I get home from work now!) but it all seems fairly odd as like I say, nothing should have changed. I can still view web pages on port 80, I'll check out netstat and report back and my firewall (iptables) is all conifgured ok (I checked that), but I'll double check the router's firewall...

20th December 2006, 10:53 AM
I just checked what my ifconfig has to say and it also showed two ip addresses (ipv4 and ipv6) for my external interface, but only one (ipv4) for my local interface. Anyway, i have had not problems with connecting to either of those interfaces.

EDIT: One thing I allways do when troubleshooting network connection issues, is to fire up wireshark (formerly know as ethereal) on the suspected interface and see what really is going on on the wire.