SSH Connection refused 5 minutes after last session was established

Posted on 2007-10-03
Last Modified: 2008-01-09
I'm running Linux RedHat 5.
Have a problem connecting to the server via SSH .
To solve it , I'm opening SSH session locally from this server to some other host .
The I'm trying to open SSH to that server remotely again and it works.
5 minutes after then , the session disconnecting and I receiveing again the Connection Refused message.
Question by:aquasw
    LVL 10

    Expert Comment

    first try to see more output wehn you run ssh

    ssh -vvv remote@host

    this gives you idea what is going wrong..

    Author Comment

    This is the output :

    OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to remotehost [remotehost] port 22.
    debug1: connect to address remotehost port 22: Connection refused
    ssh: connect to host remotehost port 22: Connection refused
    LVL 40

    Accepted Solution


    Can you check if you have another server / equipment connected to the network with duplicate IP address?

    It could be that you have another system with the same IP address.

    Can you check the arp table when you get the connection and after it get refused and compare the MAC addresses (if both servers are on the same subnet)?

    arp -a
    LVL 48

    Expert Comment

    "Connection refused" messages are generally due to firewall blocking the request.  Do you have a firewall between the two servers or running on the server with ssh?
    LVL 7

    Expert Comment

    I would bet on conflicting IP address. Had similar cases which looked quite the same.
    LVL 1

    Expert Comment

    hi, please look at the syslog file(ex: messages) on the server and determine the cause of the ssh crash. maybe your ssh server went down unexpectidly, you may have a sshd update.

    Author Comment

    Thanks, the problem was in the duplicate IP ...

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Lets look at the default installation and configuration of FreeProxy 4.10 REQUIREMENTS 1. FreeProxy 4.10 Application - Can be downloaded here ( 2. Ensure that you disable the windows fi…
    Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now