intermittent sshd connection problem in Linux

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm running sshd (OpenSSH_3.5p1) on a Red Hat Linux 9 server (kernel
2.4.20-8smp) and sometimes the users or myself cannot connect through

The error I get is "connection refused by the server".

It's an intermittent problem and I cannot reproduce it.

It's not a client problem or a network problem, as:
- I've tried with several clients (puTTy, cygwin, ssh) from Windows
and Linux.
- I can see the requests with tcpdump in the server
- I can see the half connections to ssh port in the server with

The sshd service is running, and I can connect through it from another
private network interface, even when it's not working from the public

- There's nothing significant in the /var/log/secure or

- When I run sshd in the debug mode, if I try to connect from the
public interface nothing happens, but it works properly when trying
from the private one.

- It's not a firewall problem, I tried turning it off also.

- I'm not running any other network services but sshd.

- The sshd configuration file is the default one.

After some time I can connect as if nothing happened.

any suggestions?


Re: intermittent sshd connection problem in Linux

Quoted text here. Click to load it

And what exactly do you see for traffic in this case?  Do not describe it;
post the tcpdump output.

Quoted text here. Click to load it

Something happens.  Time did not stop; you're just not describing what
happened.  If no debug output ensues when you attempt a connection, fine
-- what network traffic occurred?  Did the SYN packet arrive?  If so, how
did the server machine respond?  Did sshd get notified?  If you don't
know, trace it and find out.

  Richard Silverman

Re: intermittent sshd connection problem in Linux

Quoted text here. Click to load it

Try bumping MaxStartups in sshd_config:

       Specifies the maximum number of concurrent unauthenticated con-
       nections to the sshd daemon.  Additional connections will be
       dropped until authentication succeeds or the LoginGraceTime
       expires for a connection.  The default is 10.

Another posibility: does the host's name resolve to more than one IP

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Re: intermittent sshd connection problem in Linux (Darren Tucker) wrote in message

Quoted text here. Click to load it

thanks Darren for your answer.

Actually I found that the problem was due to a network race condition,
it's working fine now.

Site Timeline