Can't connect with ssh - Aix

This is a discussion on Can't connect with ssh - Aix ; Ummm... That one is strange: I can't login via ssh on one of my machines. ssh asks for a password then hangs, i can't even get out of it with Ctrl-C or ctrl-D. I can login via telnet to it ...

+ Reply to Thread
Results 1 to 16 of 16

Thread: Can't connect with ssh

  1. Can't connect with ssh

    Ummm... That one is strange:

    I can't login via ssh on one of my machines.

    ssh asks for a password then hangs, i can't even get out of it with
    Ctrl-C or ctrl-D.
    I can login via telnet to it with no problem.
    I have checked, that there is no firewall problem by trying to ssh
    from a machine
    that is in the same zone (no firewall between them) - the problem
    occurs as well.

    So I have tried to restart sshd, but the problem remains.

    The sessions connected via ssh before the problem occured, still work.

    What else can I do without restarting the machine?

    The oslevel is 4330-10


  2. Re: Can't connect with ssh

    On 17 Wrz, 21:21, Ryszard Mikke wrote:
    > Ummm... That one is strange:
    >
    > I can't login via ssh on one of my machines.
    >
    > ssh asks for a password then hangs, i can't even get out of it with
    > Ctrl-C or ctrl-D.
    > I can login via telnet to it with no problem.
    > I have checked, that there is no firewall problem by trying to ssh
    > from a machine
    > that is in the same zone (no firewall between them) - the problem
    > occurs as well.
    >
    > So I have tried to restart sshd, but the problem remains.
    >
    > The sessions connected via ssh before the problem occured, still work.
    >
    > What else can I do without restarting the machine?
    >
    > The oslevel is 4330-10


    Well, killing ALL the sshd processes has helped.
    But I would still like to know if I could do it without killing users'
    sessions...

    rmikke


  3. Re: Can't connect with ssh

    Ryszard Mikke schrieb:

    >
    > Well, killing ALL the sshd processes has helped.
    > But I would still like to know if I could do it without killing users'
    > sessions...


    just a wild guess: how about machine is running out of resources,
    i.e. # of processes allowed per user ?


  4. Re: Can't connect with ssh

    On 18 Wrz, 00:16, Michael Kraemer wrote:
    > Ryszard Mikke schrieb:
    >
    >
    >
    > > Well, killing ALL the sshd processes has helped.
    > > But I would still like to know if I could do it without killing users'
    > > sessions...

    >
    > just a wild guess: how about machine is running out of resources,
    > i.e. # of processes allowed per user ?


    Nope. Checked that, not even close to limit set in SMIT.

    Maybe some other resource I didn't think of, but then, why can I login
    with telnet
    and not with ssh?

    rmikke


  5. Re: Can't connect with ssh

    On 17 Wrz, 22:42, Ryszard Mikke wrote:
    > On 17 Wrz, 21:21, Ryszard Mikke wrote:
    >
    >
    >
    > > Ummm... That one is strange:

    >
    > > I can't login via ssh on one of my machines.

    >
    > > ssh asks for a password then hangs, i can't even get out of it with
    > > Ctrl-C or ctrl-D.
    > > I can login via telnet to it with no problem.
    > > I have checked, that there is no firewall problem by trying to ssh
    > > from a machine
    > > that is in the same zone (no firewall between them) - the problem
    > > occurs as well.

    >
    > > So I have tried to restart sshd, but the problem remains.

    >
    > > The sessions connected via ssh before the problem occured, still work.

    >
    > > What else can I do without restarting the machine?

    >
    > > The oslevel is 4330-10

    >
    > Well, killing ALL the sshd processes has helped.
    > But I would still like to know if I could do it without killing users'
    > sessions...


    Sh*t, @#%$^%#!!, again.

    Any ideas as to the reason of this happening?

    rmikke


  6. Re: Can't connect with ssh

    On 18 Wrz, 00:42, Ryszard Mikke wrote:
    > On 17 Wrz, 22:42, Ryszard Mikke wrote:
    >
    >
    >
    > > On 17 Wrz, 21:21, Ryszard Mikke wrote:

    >
    > > > Ummm... That one is strange:

    >
    > > > I can't login via ssh on one of my machines.

    >
    > > > ssh asks for a password then hangs, i can't even get out of it with
    > > > Ctrl-C or ctrl-D.
    > > > I can login via telnet to it with no problem.
    > > > I have checked, that there is no firewall problem by trying to ssh
    > > > from a machine
    > > > that is in the same zone (no firewall between them) - the problem
    > > > occurs as well.

    >
    > > > So I have tried to restart sshd, but the problem remains.

    >
    > > > The sessions connected via ssh before the problem occured, still work.

    >
    > > > What else can I do without restarting the machine?

    >
    > > > The oslevel is 4330-10

    >
    > > Well, killing ALL the sshd processes has helped.
    > > But I would still like to know if I could do it without killing users'
    > > sessions...

    >
    > Sh*t, @#%$^%#!!, again.
    >
    > Any ideas as to the reason of this happening?


    Errpt says nothing, netstat shows these sessions as ESTABLISHED. I
    just don't get prompt...

    rmikke


  7. Re: Can't connect with ssh

    Ryszard Mikke wrote:
    > On 18 Wrz, 00:42, Ryszard Mikke wrote:
    >> On 17 Wrz, 22:42, Ryszard Mikke wrote:
    >>
    >>
    >>
    >>> On 17 Wrz, 21:21, Ryszard Mikke wrote:
    >>>> Ummm... That one is strange:
    >>>> I can't login via ssh on one of my machines.
    >>>> ssh asks for a password then hangs, i can't even get out of it with
    >>>> Ctrl-C or ctrl-D.
    >>>> I can login via telnet to it with no problem.
    >>>> I have checked, that there is no firewall problem by trying to ssh
    >>>> from a machine
    >>>> that is in the same zone (no firewall between them) - the problem
    >>>> occurs as well.
    >>>> So I have tried to restart sshd, but the problem remains.
    >>>> The sessions connected via ssh before the problem occured, still work.
    >>>> What else can I do without restarting the machine?
    >>>> The oslevel is 4330-10
    >>> Well, killing ALL the sshd processes has helped.
    >>> But I would still like to know if I could do it without killing users'
    >>> sessions...

    >> Sh*t, @#%$^%#!!, again.
    >>
    >> Any ideas as to the reason of this happening?

    >
    > Errpt says nothing, netstat shows these sessions as ESTABLISHED. I
    > just don't get prompt...
    >
    > rmikke
    >


    use truss -fp on the ssh daemon process then connect again. this
    should give some clue on what is happening.

    Joachim Gann


  8. Re: Can't connect with ssh

    Joachim Gann wrote:
    > Ryszard Mikke wrote:


    >>>>> The oslevel is 4330-10


    >


    ah well, no luck. truss was introduced in aix 5.2

  9. Re: Can't connect with ssh

    Joachim Gann wrote:
    > Joachim Gann wrote:
    >> Ryszard Mikke wrote:

    >
    >>>>>> The oslevel is 4330-10

    >
    >
    > ah well, no luck. truss was introduced in aix 5.2


    Were there any clues in the SSH log?

  10. Re: Can't connect with ssh

    Ryszard Mikke pisze:
    > On 17 Wrz, 22:42, Ryszard Mikke wrote:
    >
    > Sh*t, @#%$^%#!!, again.
    >
    > Any ideas as to the reason of this happening?


    Ryszard try to put sshd into debug mode and watch syslog.

    --
    Regards
    Filip Kata

  11. Re: Can't connect with ssh

    On Sep 17, 2:21 pm, Ryszard Mikke wrote:
    > Ummm... That one is strange:
    >
    > I can't login via ssh on one of my machines.
    >
    > ssh asks for a password then hangs, i can't even get out of it with
    > Ctrl-C or ctrl-D.
    > I can login via telnet to it with no problem.
    > I have checked, that there is no firewall problem by trying to ssh
    > from a machine
    > that is in the same zone (no firewall between them) - the problem
    > occurs as well.
    >
    > So I have tried to restart sshd, but the problem remains.
    >
    > The sessions connected via ssh before the problem occured, still work.
    >
    > What else can I do without restarting the machine?
    >
    > The oslevel is 4330-10


    As someone already mentioned, watch syslog.

    I often find that permissions cause problems with ssh. Especially the
    perms on your home directory.

    Miles


  12. Re: Can't connect with ssh

    On Sep 17, 4:21 pm, Ryszard Mikke wrote:
    > Ummm... That one is strange:
    >
    > I can't login via ssh on one of my machines.
    >
    > ssh asks for a password then hangs, i can't even get out of it with
    > Ctrl-C or ctrl-D.
    > I can login via telnet to it with no problem.
    > I have checked, that there is no firewall problem by trying to ssh
    > from a machine
    > that is in the same zone (no firewall between them) - the problem
    > occurs as well.
    >
    > So I have tried to restart sshd, but the problem remains.
    >
    > The sessions connected via ssh before the problem occured, still work.
    >
    > What else can I do without restarting the machine?
    >
    > The oslevel is 4330-10


    You need to check how the ssh is authenticating users. PAM, keyboard
    authentication and stuff like that. Run a ssh -vvv user@hostname from
    your computer to the server and see which authentication steps are
    made and which failed.


  13. Re: Can't connect with ssh

    On Sep 18, 11:56 am, Emerson Seiti Takahashi wrote:
    > On Sep 17, 4:21 pm, Ryszard Mikke wrote:
    >
    >
    >
    > > Ummm... That one is strange:

    >
    > > I can't login via ssh on one of my machines.

    >
    > > ssh asks for a password then hangs, i can't even get out of it with
    > > Ctrl-C or ctrl-D.
    > > I can login via telnet to it with no problem.
    > > I have checked, that there is no firewall problem by trying to ssh
    > > from a machine
    > > that is in the same zone (no firewall between them) - the problem
    > > occurs as well.

    >
    > > So I have tried to restart sshd, but the problem remains.

    >
    > > The sessions connected via ssh before the problem occured, still work.

    >
    > > What else can I do without restarting the machine?

    >
    > > The oslevel is 4330-10

    >
    > You need to check how the ssh is authenticating users. PAM, keyboard
    > authentication and stuff like that. Run a ssh -vvv user@hostname from
    > your computer to the server and see which authentication steps are
    > made and which failed.


    try to run in debbug mode ... and connect with ssh from the same
    machine ...
    mymachine> ssh mymachine
    ---
    other options
    re-install ssh


  14. Re: Can't connect with ssh

    On Sep 18, 7:21 am, Ryszard Mikke wrote:
    > Ummm... That one is strange:
    >
    > I can't login via ssh on one of my machines.
    >
    > ssh asks for a password then hangs, i can't even get out of it with
    > Ctrl-C or ctrl-D.
    > I can login via telnet to it with no problem.
    > I have checked, that there is no firewall problem by trying to ssh
    > from a machine
    > that is in the same zone (no firewall between them) - the problem
    > occurs as well.
    >
    > So I have tried to restart sshd, but the problem remains.
    >
    > The sessions connected via ssh before the problem occured, still work.
    >
    > What else can I do without restarting the machine?
    >
    > The oslevel is 4330-10


    also check your DNS lookups

    and post your solution


  15. Re: Can't connect with ssh


    > also check your DNS lookups
    >
    > and post your solution - Hide quoted text -
    >
    > - Show quoted text -



    My dollar is on bad reverse-DNS lookups. Our DNS here is not handled
    by the UNIX team, and the staff that handles it is not necessarily
    fully up to speed with the intricacies of split-horizon DNS, and so a
    lot of reverse lookups get sent out to neverneverland, which causes
    SSH to hang indefinitely, until all resolvers are tried.

    You may find releif in "UseDNS No" in the sshd_config file.

    mjc

    --
    Mark J. Cecil -- Senior UNIX Engineer and Part-time Curmudgeon
    New Orleans, Louisiana
    http://notrealswift.blogspot.com
    "La Nouvelle-Orleans... Maintenant et pour toujours"


  16. Re: Can't connect with ssh

    Another possibility that causes hang situations is the inability to
    mount the user's home directory.

    Running AIX trace on the system you're logging into, and stopping it
    when you get blocked
    might expose some things going wrong that are difficult to diagnose.
    It will reveal things like
    reverse-DNS, mounting problems, etc.


+ Reply to Thread