SSH connection problem - SSH

This is a discussion on SSH connection problem - SSH ; Hi everyone... I am relatively new to configuring SSH.. I use it a lot, every day in fact. I am having a problem with SSH on my FreeBSD system. I think it is FreeBSD version 4.2 or 4.8, I can't ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: SSH connection problem

  1. SSH connection problem

    Hi everyone...

    I am relatively new to configuring SSH.. I use it a lot, every day in
    fact.

    I am having a problem with SSH on my FreeBSD system. I think it is
    FreeBSD version 4.2 or 4.8, I can't remember. And the SSH version is
    whatever came with FreeBSD by default. Also, Squid 2.4 STABLE 12
    (caching proxy) is set up on the system.

    >From a Windows system outside of the network (using PuTTy), I can

    connect through port 22 to the server, but it doesn't even give me a
    chance to login. The error message goes as follows:

    ssh_exchange_identification: Connection closed by remote host

    The network design is just a T1 coming in, a Cisco router, the FreeBSD
    box with two ethernet cards (one for internal, one for external), and
    then two hubs with about fifteen Windows machines connected.

    >From inside the network, I cannot even establish a connection through

    SSH. It's almost like the proxy is blocking it, but I can't see any
    signs of that in the proxy's configuration file.

    Any ideas as to how to fix the problem with SSH?


  2. Re: SSH connection problem

    >>>>> "SB" == Steven Borrelli writes:

    SB> Hi everyone... I am relatively new to configuring SSH.. I use it
    SB> a lot, every day in fact.

    SB> I am having a problem with SSH on my FreeBSD system. I think it
    SB> is FreeBSD version 4.2 or 4.8, I can't remember. And the SSH
    SB> version is whatever came with FreeBSD by default. Also, Squid 2.4
    SB> STABLE 12 (caching proxy) is set up on the system.

    >> From a Windows system outside of the network (using PuTTy), I can

    SB> connect through port 22 to the server, but it doesn't even give me
    SB> a chance to login. The error message goes as follows:

    SB> ssh_exchange_identification: Connection closed by remote host

    This often means your libwrap settings (/etc/hosts.{allow,deny}) are
    denying the connection.

    SB> The network design is just a T1 coming in, a Cisco router, the
    SB> FreeBSD box with two ethernet cards (one for internal, one for
    SB> external), and then two hubs with about fifteen Windows machines
    SB> connected.

    >> From inside the network, I cannot even establish a connection
    >> through

    SB> SSH. It's almost like the proxy is blocking it, but I can't see
    SB> any signs of that in the proxy's configuration file.

    SB> Any ideas as to how to fix the problem with SSH?


    --
    Richard Silverman
    res@qoxp.net


  3. Re: SSH connection problem

    Steven Borrelli schreef:
    > ssh_exchange_identification: Connection closed by remote host


    This could be a whole range of problems. What does the server log report
    for your login? Does the same thing happen when you ssh to localhost on
    the server?

  4. Re: SSH connection problem

    On Sep 1, 6:39 am, Steven Mocking
    wrote:
    > Steven Borrelli schreef:
    >
    > > ssh_exchange_identification: Connection closed by remote host

    >
    > This could be a whole range of problems. What does the server log report
    > for your login? Does the same thing happen when you ssh to localhost on
    > the server?


    I can ssh to localhost just fine.. there's no problem with that.
    It's just the remote connections i'm having trouble with. And it
    appears to be that way for all user accounts on the system. I'm not
    able to check the error logs at the moment... I'll get back with you
    on that.


  5. Re: SSH connection problem

    On 1 Sep, 17:46, Steven Borrelli wrote:
    > On Sep 1, 6:39 am, Steven Mocking
    >
    > wrote:
    > > Steven Borrelli schreef:

    >
    > > > ssh_exchange_identification: Connection closed by remote host

    >
    > > This could be a whole range of problems. What does the server log report
    > > for your login? Does the same thing happen when you ssh to localhost on
    > > the server?

    >
    > I can ssh to localhost just fine.. there's no problem with that.
    > It's just the remote connections i'm having trouble with. And it
    > appears to be that way for all user accounts on the system. I'm not
    > able to check the error logs at the moment... I'll get back with you
    > on that.


    That sounds like a network or firewall problem. Definitely telnet to
    port 22 from the client and see what happens.


  6. Re: SSH connection problem

    >>>>> "NK" == Nico writes:

    NK> On 1 Sep, 17:46, Steven Borrelli wrote:
    >> On Sep 1, 6:39 am, Steven Mocking
    >>
    >> wrote:
    >> > Steven Borrelli schreef:

    >>
    >> > > ssh_exchange_identification: Connection closed by remote host

    >>
    >> > This could be a whole range of problems. What does the server log

    >> report > for your login? Does the same thing happen when you ssh to
    >> localhost on > the server?
    >>
    >> I can ssh to localhost just fine.. there's no problem with that.
    >> It's just the remote connections i'm having trouble with. And it
    >> appears to be that way for all user accounts on the system. I'm
    >> not able to check the error logs at the moment... I'll get back
    >> with you on that.


    NK> That sounds like a network or firewall problem. Definitely telnet
    NK> to port 22 from the client and see what happens.

    Did you check check your libwrap control files, as I suggested earlier?
    As I said, that's usually the cause of this problem.

    --
    Richard Silverman
    res@qoxp.net


  7. Re: SSH connection problem

    Steven Borrelli schreef:
    > On Sep 1, 6:39 am, Steven Mocking
    > wrote:
    >> Steven Borrelli schreef:
    >>
    >>> ssh_exchange_identification: Connection closed by remote host

    >> This could be a whole range of problems. What does the server log report
    >> for your login? Does the same thing happen when you ssh to localhost on
    >> the server?

    >
    > I can ssh to localhost just fine.. there's no problem with that.
    > It's just the remote connections i'm having trouble with. And it
    > appears to be that way for all user accounts on the system. I'm not
    > able to check the error logs at the moment... I'll get back with you
    > on that.
    >


    The tcp wrapper problems Richard describes are very likely the cause if
    it reacts different depending on the client host.

    Also check if you have installed something like denyhost for blocking
    automated login attempts. I've found that denyhost in particular has/had
    (at least in june 2006) a very overzealous default configuration and
    blocks ip addresses from SSH after a few typo's. You might want to look
    at /etc/denyhosts.conf if it's installed.

  8. Re: SSH connection problem

    On Sep 2, 5:58 am, Steven Mocking
    wrote:
    > Steven Borrelli schreef:
    >
    > > On Sep 1, 6:39 am, Steven Mocking
    > > wrote:
    > >> Steven Borrelli schreef:

    >
    > >>> ssh_exchange_identification: Connection closed by remote host
    > >> This could be a whole range of problems. What does the server log report
    > >> for your login? Does the same thing happen when you ssh to localhost on
    > >> the server?

    >
    > > I can ssh to localhost just fine.. there's no problem with that.
    > > It's just the remote connections i'm having trouble with. And it
    > > appears to be that way for all user accounts on the system. I'm not
    > > able to check the error logs at the moment... I'll get back with you
    > > on that.

    >
    > The tcp wrapper problems Richard describes are very likely the cause if
    > it reacts different depending on the client host.
    >
    > Also check if you have installed something like denyhost for blocking
    > automated login attempts. I've found that denyhost in particular has/had
    > (at least in june 2006) a very overzealous default configuration and
    > blocks ip addresses from SSH after a few typo's. You might want to look
    > at /etc/denyhosts.conf if it's installed.


    Sorry guys, I haven't had a chance to check any of these things
    lately...

    My thoughts are that nothing has been changed by anyone in the last
    two years. In that time frame, we did have some lightning damage to
    the router and some other things requiring the server to be rebooted.
    Could there be something that was not set to start automatically upon
    boot?

    ssh was working perfectly two years ago. No one has even touched this
    machine since then -- except me, starting a few months ago (unless we
    got hacked...?). ssh has never worked properly for as long as I have
    been working on the machine.

    I'll check the logs soon.


  9. Re: SSH connection problem

    On Sep 4, 2:48 pm, Steven Borrelli wrote:
    > On Sep 2, 5:58 am, Steven Mocking
    >
    >
    >
    >
    >
    > wrote:
    > > Steven Borrelli schreef:

    >
    > > > On Sep 1, 6:39 am, Steven Mocking
    > > > wrote:
    > > >> Steven Borrelli schreef:

    >
    > > >>> ssh_exchange_identification: Connection closed by remote host
    > > >> This could be a whole range of problems. What does the server log report
    > > >> for your login? Does the same thing happen when you ssh to localhost on
    > > >> the server?

    >
    > > > I can ssh to localhost just fine.. there's no problem with that.
    > > > It's just the remote connections i'm having trouble with. And it
    > > > appears to be that way for all user accounts on the system. I'm not
    > > > able to check the error logs at the moment... I'll get back with you
    > > > on that.

    >
    > > The tcp wrapper problems Richard describes are very likely the cause if
    > > it reacts different depending on the client host.

    >
    > > Also check if you have installed something like denyhost for blocking
    > > automated login attempts. I've found that denyhost in particular has/had
    > > (at least in june 2006) a very overzealous default configuration and
    > > blocks ip addresses from SSH after a few typo's. You might want to look
    > > at /etc/denyhosts.conf if it's installed.

    >
    > Sorry guys, I haven't had a chance to check any of these things
    > lately...
    >
    > My thoughts are that nothing has been changed by anyone in the last
    > two years. In that time frame, we did have some lightning damage to
    > the router and some other things requiring the server to be rebooted.
    > Could there be something that was not set to start automatically upon
    > boot?
    >
    > ssh was working perfectly two years ago. No one has even touched this
    > machine since then -- except me, starting a few months ago (unless we
    > got hacked...?). ssh has never worked properly for as long as I have
    > been working on the machine.
    >
    > I'll check the logs soon.- Hide quoted text -
    >
    > - Show quoted text -


    Hey now it works!

    All I did was a kill -HUP [squid's pid] and it started working. I
    have no idea what was wrong with it, but it's all good now. I don't
    think it had anything to do with the /etc/hosts.{allow/deny} or
    anything. This being the case, any thoughts as to why it wasn't
    working before?


  10. Re: SSH connection problem

    On Sep 4, 2:48 pm, Steven Borrelli wrote:
    > On Sep 2, 5:58 am, Steven Mocking
    >
    >
    >
    >
    >
    > wrote:
    > > Steven Borrelli schreef:

    >
    > > > On Sep 1, 6:39 am, Steven Mocking
    > > > wrote:
    > > >> Steven Borrelli schreef:

    >
    > > >>> ssh_exchange_identification: Connection closed by remote host
    > > >> This could be a whole range of problems. What does the server log report
    > > >> for your login? Does the same thing happen when you ssh to localhost on
    > > >> the server?

    >
    > > > I can ssh to localhost just fine.. there's no problem with that.
    > > > It's just the remote connections i'm having trouble with. And it
    > > > appears to be that way for all user accounts on the system. I'm not
    > > > able to check the error logs at the moment... I'll get back with you
    > > > on that.

    >
    > > The tcp wrapper problems Richard describes are very likely the cause if
    > > it reacts different depending on the client host.

    >
    > > Also check if you have installed something like denyhost for blocking
    > > automated login attempts. I've found that denyhost in particular has/had
    > > (at least in june 2006) a very overzealous default configuration and
    > > blocks ip addresses from SSH after a few typo's. You might want to look
    > > at /etc/denyhosts.conf if it's installed.

    >
    > Sorry guys, I haven't had a chance to check any of these things
    > lately...
    >
    > My thoughts are that nothing has been changed by anyone in the last
    > two years. In that time frame, we did have some lightning damage to
    > the router and some other things requiring the server to be rebooted.
    > Could there be something that was not set to start automatically upon
    > boot?
    >
    > ssh was working perfectly two years ago. No one has even touched this
    > machine since then -- except me, starting a few months ago (unless we
    > got hacked...?). ssh has never worked properly for as long as I have
    > been working on the machine.
    >
    > I'll check the logs soon.- Hide quoted text -
    >
    > - Show quoted text -


    Hey now it works!

    All I did was a kill -HUP [sshd's pid] and it started working. I
    have no idea what was wrong with it, but it's all good now. I don't
    think it had anything to do with the /etc/hosts.{allow/deny} or
    anything. This being the case, any thoughts as to why it wasn't
    working before?


+ Reply to Thread