SSH connection takes 30 seconds: 2008.1 - Mandriva

This is a discussion on SSH connection takes 30 seconds: 2008.1 - Mandriva ; Hi, I just installed 2008.1. When I try to make an ssh connection to the LM box it takes about 30 seconds before I even get a login prompt. Sometimes it takes so long that the connection times out. Once ...

+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 20 of 72

Thread: SSH connection takes 30 seconds: 2008.1

  1. SSH connection takes 30 seconds: 2008.1

    Hi,

    I just installed 2008.1.

    When I try to make an ssh connection to the LM box it takes about 30
    seconds before I even get a login prompt. Sometimes it takes so long
    that the connection times out.

    Once connected, it runs fine. But any attempt to start another session
    will take just as long.

    I'm using PuTTY on a doze box as the client. This does NOT happen with
    PuTTY when I connect to other LM machines (that are not 2008.1).

    Any ideas?

    Thanks,


    Frank

  2. Re: SSH connection takes 30 seconds: 2008.1

    On Tue, 22 Apr 2008 20:14:20 GMT, Frank Dreyfus wrote:
    > Hi,
    >
    > I just installed 2008.1.
    >
    > When I try to make an ssh connection to the LM box it takes about 30
    > seconds before I even get a login prompt. Sometimes it takes so long
    > that the connection times out.
    >
    >
    > I'm using PuTTY on a doze box as the client. This does NOT happen with
    > PuTTY when I connect to other LM machines (that are not 2008.1).
    >
    > Any ideas?


    Hmmm, no information about your LAN setup. Tisk, tisk.

    My first WAG, no ip/fqdn/ailas in doze's etc\hosts file.


  3. Re: SSH connection takes 30 seconds: 2008.1

    Bit Twister wrote in
    news:slrng0sl22.ubs.BitTwister@wm81.home.test:

    > Hmmm, no information about your LAN setup. Tisk, tisk.
    >
    > My first WAG, no ip/fqdn/ailas in doze's etc\hosts file.


    Hi Bit,

    The LAN is the same I use for another LM box (2008.0). Communications are
    fine. Everything else: vnc, webmin works fine over the LAN.

    I think you're right about /etc/hosts. Or almost right. The host file
    is correct but the hostname is "stuck" at localhost.

    Here's cat /etc/hosts:
    # generated by drakhosts
    127.0.0.1 server server. localhost

    And drakhosts shows the Hostname = server and the rest to be Host
    aliases.

    But hostname yields localhost NOT server.

    I've rebooted a dozen times with no change in the hostname.

    Any ideas?

    Thanks,


    Frank




  4. Re: SSH connection takes 30 seconds: 2008.1

    Try disabling IPV6.
    Or it could be resolver problems-- ie it times out on the first two
    resolvers in /etc/resolv.conf before finally getting to a useful one.

    Frank Dreyfus writes:

    >Hi,


    >I just installed 2008.1.


    >When I try to make an ssh connection to the LM box it takes about 30
    >seconds before I even get a login prompt. Sometimes it takes so long
    >that the connection times out.


    >Once connected, it runs fine. But any attempt to start another session
    >will take just as long.


    >I'm using PuTTY on a doze box as the client. This does NOT happen with
    >PuTTY when I connect to other LM machines (that are not 2008.1).


    >Any ideas?


    >Thanks,



    >Frank


  5. Re: SSH connection takes 30 seconds: 2008.1

    On Wed, 23 Apr 2008 00:35:34 GMT, Frank Dreyfus wrote:
    > Bit Twister wrote in
    > news:slrng0sl22.ubs.BitTwister@wm81.home.test:
    >
    >> Hmmm, no information about your LAN setup. Tisk, tisk.
    >>
    >> My first WAG, no ip/fqdn/ailas in doze's etc\hosts file.

    >
    > Hi Bit,
    >
    > The LAN is the same I use for another LM box (2008.0). Communications are
    > fine. Everything else: vnc, webmin works fine over the LAN.


    Lots of talk, no information. :-)

    Guessing LAN plugged into ISP router giving out dhcp leases.


    > I think you're right about /etc/hosts.


    Note, I indictated etc\hosts
    not etc/hosts


    > Or almost right. The host file
    > is correct but the hostname is "stuck" at localhost.
    >
    > Here's cat /etc/hosts:
    > # generated by drakhosts
    > 127.0.0.1 server server. localhost



    Names like localhost will cause problems.
    I always recommend a FQDN without localhost.

    You hiding info does not help. So you figure out what I
    am suggesting by following examples.


    My guess what you should have is in the next two files on Mandriva

    cat /etc/hosts
    127.0.0.1 server. server

    If so, /etc/sysconfig/network need FQDN, with my recommendations

    $ cat /etc/sysconfig/network
    NETWORKING_IPV6=no # speedup DNS lookups
    NOZEROCONF=yes # no doze lookups needed
    NEEDHOSTNAME=no # I'll use my own hostname
    HOSTNAME= server.
    NETWORKING=yes


    On an small LAN for servers, I would make it a static ip, not dynamic
    as you have shown me so far

    Anytime you dink with host name and it's host ip, I suggest a reboot.


    My setup

    $ head -3 /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    192.168.1.11 fw.home.test fw
    192.168.1.131 wm81.home.test wm81

    $ cat /etc/sysconfig/network
    NETWORKING_IPV6=no # speedup DNS lookups
    NOZEROCONF=yes # no doze lookups needed
    NEEDHOSTNAME=no # I'll use my own hostname
    HOSTNAME=wm81.home.test
    NETWORKING=yes


  6. Re: SSH connection takes 30 seconds: 2008.1

    Frank Dreyfus writes:

    >Bit Twister wrote in
    >news:slrng0sl22.ubs.BitTwister@wm81.home.test:


    >> Hmmm, no information about your LAN setup. Tisk, tisk.
    >>
    >> My first WAG, no ip/fqdn/ailas in doze's etc\hosts file.


    >Hi Bit,


    >The LAN is the same I use for another LM box (2008.0). Communications are
    >fine. Everything else: vnc, webmin works fine over the LAN.


    >I think you're right about /etc/hosts. Or almost right. The host file
    >is correct but the hostname is "stuck" at localhost.


    >Here's cat /etc/hosts:
    ># generated by drakhosts
    >127.0.0.1 server server. localhost


    >And drakhosts shows the Hostname = server and the rest to be Host
    >aliases.


    >But hostname yields localhost NOT server.


    >I've rebooted a dozen times with no change in the hostname.


    Why would it change?
    /etc/sysconfig/network
    Change the
    HOSTNAME=
    line



    >Any ideas?


    >Thanks,



    >Frank





  7. Re: SSH connection takes 30 seconds: 2008.1

    Bit Twister wrote in
    news:slrng0t26a.epk.BitTwister@wm81.home.test:

    > Names like localhost will cause problems.
    > I always recommend a FQDN without localhost.


    Hi Bit,

    I used your /etc/hosts and /etc/sysconfig/network as a guide; set a
    static ip; and now I have a domain name!

    Thanks!

    But the original problem remains. It takes 20 to 30 seconds to get the
    login prompt when I open a console via PuTTY/ssh.

    I have another server here on the SAME LAN (2008.0) and it responds
    immediately. In fact every LM machine I connect to responds quickly.
    Most are on the WAN.

    There is something going on with my new 2008.1 installation that isn't
    right.

    Any thoughts?

    Thanks,


    Frank

  8. Re: SSH connection takes 30 seconds: 2008.1

    Hi,

    I disabled IPV6 in /etc/sysconfig/networks as per BitTwister's advice:

    # cat /etc/sysconfig/network
    NETWORKING_IPV6=no #speeds dns lookup
    NETWORKING=yes
    NEEDHOSTNAME=no #I'll use my own hostname
    HOSTNAME=server.



    I'm using OpenDNS as my dns server:

    # cat /etc/resolv.conf
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by
    resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 208.67.222.222
    nameserver 208.67.220.220

    However, my attempts to connect via PuTTY/ssh use a direct ip
    (192.168.0.102) so there isn't any dns lookup.

    Thanks,


    Frank




    Unruh wrote in news:YAvPj.1399$PM5.1095
    @edtnps92:

    > Try disabling IPV6.
    > Or it could be resolver problems-- ie it times out on the first two
    > resolvers in /etc/resolv.conf before finally getting to a useful one.



  9. Re: SSH connection takes 30 seconds: 2008.1

    Frank Dreyfus wrote:

    > But the original problem remains. It takes 20 to 30 seconds to get the
    > login prompt when I open a console via PuTTY/ssh.
    >
    > I have another server here on the SAME LAN (2008.0) and it responds
    > immediately. In fact every LM machine I connect to responds quickly.
    > Most are on the WAN.
    >
    > There is something going on with my new 2008.1 installation that isn't
    > right.
    >
    > Any thoughts?


    Have you already tried connecting from one of the other Mandriva machines?
    This would exclude the possibility that the problem lies with - say - an
    incompatibility between that particular version of /putty/ and the version
    of /OpenSSH/ used on the Mandriva 2008.1 box.

    Also check for the load on the target machine. If the load is very high,
    then /ssh/ may time out.

    You asked for thoughts. Well, those were just my thoughts...

    --
    Aragorn
    (registered GNU/Linux user #223157)

  10. Re: SSH connection takes 30 seconds: 2008.1

    Aragorn wrote in news:QYwPj.45845$_h7.22098
    @newsfe05.ams2:

    > You asked for thoughts. Well, those were just my thoughts...


    And much appreciated!

    I'll give a try to connecting from another LM machine.

    The server is essentially unused at this point since I'm just setting it
    up; so I don't think loading is an issue.

    Thanks,


    Frank

  11. Re: SSH connection takes 30 seconds: 2008.1

    Frank Dreyfus wrote:

    > Aragorn wrote in news:QYwPj.45845$_h7.22098
    > @newsfe05.ams2:
    >
    >> You asked for thoughts. Well, those were just my thoughts...

    >
    > And much appreciated!
    >
    > I'll give a try to connecting from another LM machine.
    >
    > The server is essentially unused at this point since I'm just setting it
    > up; so I don't think loading is an issue.


    Well, it may not be that kind of load, but I was rather thinking along the
    lines of a process stuck in an infinite loop or something. ;-)

    --
    Aragorn
    (registered GNU/Linux user #223157)

  12. Re: SSH connection takes 30 seconds: 2008.1

    On Wed, 23 Apr 2008 01:35:50 GMT, Frank Dreyfus wrote:
    > Hi,
    >
    > I disabled IPV6 in /etc/sysconfig/networks as per BitTwister's advice:
    >
    > # cat /etc/sysconfig/network
    > NETWORKING_IPV6=no #speeds dns lookup
    > NETWORKING=yes
    > NEEDHOSTNAME=no #I'll use my own hostname
    > HOSTNAME=server.
    >


    What, no
    NOZEROCONF=yes # no doze lookups needed

    Ok, have it your way.


    >
    > I'm using OpenDNS as my dns server:
    >
    > # cat /etc/resolv.conf
    > # Dynamic resolv.conf(5) file for glibc resolver(3) generated by
    > resolvconf(8)
    > # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    > nameserver 208.67.222.222
    > nameserver 208.67.220.220


    Yeah, but you are connecting from doze so the above has no impact, I hope.


    > However, my attempts to connect via PuTTY/ssh use a direct ip
    > (192.168.0.102) so there isn't any dns lookup.


    Dang, we need to split the problem in two to see why.

    On mandriva 2008.1, click up a terminal,

    ssh $USER@$(hostname)

    and see you logged in quickly or as slow as from doze.


  13. Re: SSH connection takes 30 seconds: 2008.1

    Aragorn wrote in
    news:QYwPj.45845$_h7.22098@newsfe05.ams2:

    > Have you already tried connecting from one of the other Mandriva
    > machines?


    OK. Just tried it.

    I don't know how to use ssh from linux but I entered:
    ssh 192.168.0.102

    where the above ip is the ip of the machine running sshd.

    I got an immediate login prompt! So that certainly does indicate an
    issue with sshd on 2008.1 and PuTTY. I'll have to check to see if my
    PuTTY is current.

    My password was NOT accepted by the sshd side; but that's not really the
    issue here. Strange though since I surely know the password. Odd that
    it asks for the root p/w. I don't know how to login as a user.

    The fact remains that PuTTY has, and still, works well with all older
    versions of LM including 2008.0.

    So it would seem to indicate something new/different on 2008.1.

    Thanks,


    Frank

  14. Re: SSH connection takes 30 seconds: 2008.1

    On Wed, 23 Apr 2008 01:35:50 GMT, Frank Dreyfus wrote:
    >
    > However, my attempts to connect via PuTTY/ssh use a direct ip
    > (192.168.0.102) so there isn't any dns lookup.


    Ah, frap, can we assume you reconfigured your nic to use static
    instead of dynamic (dhcp).

    Or did you just lookup server's ip and try it from doze?


  15. Re: SSH connection takes 30 seconds: 2008.1

    On Wed, 23 Apr 2008 02:55:07 GMT, Frank Dreyfus wrote:

    > I don't know how to use ssh from linux but I entered:
    > ssh 192.168.0.102


    ssh login_id_here@192.168.0.102



    >
    > My password was NOT accepted by the sshd side; but that's not really the
    > issue here. Strange though since I surely know the password. Odd that
    > it asks for the root p/w. I don't know how to login as a user.


    were you doing an ssh from a root terminal? :-(

    >
    > So it would seem to indicate something new/different on 2008.1.


    If you want we can look through your network settings, Or you could
    dump your settings and compare two mandriva installs.

    http://groups.google.com/group/alt.o...58e2777148a885

  16. Re: SSH connection takes 30 seconds: 2008.1

    Aragorn wrote in
    news:5nxPj.45891$_h7.14198@newsfe05.ams2:

    > Well, it may not be that kind of load, but I was rather thinking along
    > the lines of a process stuck in an infinite loop or something. ;-)
    >


    Good catch. I don't know if it's enough to make a difference but there
    are some odd processes I hadn't expected.

    For example, pulseaudio is taking over 5% of cpu time.

    This is especially troubling b/c I don't even have speakers on this
    machine. I have no need for sound since the machine is in a closet. I
    was going to remove pulseaudio but there are a lot of other packages that
    depend on it. For example: acroread, a host if kde packages and a whole
    bunch of lib's.

    Is there any way to calm it down?

    Another offender is artsd. Another package I probably don't need but
    that has many other packages that depend on it.

    In total, probably 20-25% of cpu is consumed by various processes. This
    is much different than my 2008.0 box which is running at less than 5% at
    the moment.

    True, the hardware is different but both are fairly new and have
    reasonably fast processors. Not Core2 stuff and not 64bit but certainly
    not old and decrepit.

    Any ideas on the above? Could this be the cause of slow sshd
    connections. Note that it's only the delay till the login prompt that's
    a concern. Once I get the prompt, ssh runs will little or no delay.

    Thanks,


    Frank

  17. Re: SSH connection takes 30 seconds: 2008.1

    On Wed, 23 Apr 2008 03:17:50 GMT, Frank Dreyfus wrote:
    >
    > For example, pulseaudio is taking over 5% of cpu time.
    >
    > This is especially troubling b/c I don't even have speakers on this
    > machine. I have no need for sound since the machine is in a closet. I
    > was going to remove pulseaudio but there are a lot of other packages that
    > depend on it. For example: acroread, a host if kde packages and a whole
    > bunch of lib's.
    >
    > Is there any way to calm it down?
    >
    > Another offender is artsd. Another package I probably don't need but
    > that has many other packages that depend on it.


    You can just stop the sound stuff from running on boot in mcc and also
    just stop the service/daemon for testing.



  18. Re: SSH connection takes 30 seconds: 2008.1

    Bit Twister wrote in
    news:slrng0t9pe.gov.BitTwister@wm81.home.test:

    > ssh login_id_here@192.168.0.102


    Thanks! That works. I get the login prompt instantly and my p/w works.

    I realize now, which I knew but forgot, that you can't login as root. You
    have to su into it.

    Thanks,


    Frank

  19. Re: SSH connection takes 30 seconds: 2008.1

    Frank Dreyfus wrote:

    > Aragorn wrote in
    > news:QYwPj.45845$_h7.22098@newsfe05.ams2:
    >
    >> Have you already tried connecting from one of the other Mandriva
    >> machines?

    >
    > OK. Just tried it.
    >
    > I don't know how to use ssh from linux but I entered:
    > ssh 192.168.0.102


    That works, yes. ;-)

    > where the above ip is the ip of the machine running sshd.
    >
    > I got an immediate login prompt! So that certainly does indicate an
    > issue with sshd on 2008.1 and PuTTY. I'll have to check to see if my
    > PuTTY is current.


    That might be a good idea. ;-)

    > My password was NOT accepted by the sshd side; but that's not really the
    > issue here. Strange though since I surely know the password. Odd that
    > it asks for the root p/w. I don't know how to login as a user.


    As Bit Twister suggested, you may have attempted to /ssh/ in from within a
    root terminal. If you don't supply a user account as a parameter to
    the /ssh/ command, it will attempt to log in as the account you're issuing
    the command from.

    A few ways to login via /ssh...:/

    ssh

    ssh -l

    ssh @

    I would also disable root login over /ssh,/ as the root account is known to
    exist on all systems, and this is why so many cracked UNIX boxen exist:
    sysadmins being too lax and allowing root access over /ssh/ while the
    script kiddies are trying brute force password attacks with root as the
    account name.

    It may also be that root login over /ssh/ *is* disabled on the target
    machine - I don't know to what defaults Mandriva sets it up these days, and
    it also likely depends on your chosen /msec/ level - in which case it would
    ask you for the password but report "login incorrect" nevertheless.

    A typical UNIX login shell does not check whether the requested login exists
    or whether it has access before it asks you for the password. It simply
    presents you with a login prompt and a password prompt and then checks
    whether the login exists in */etc/passwd,* whether the password exists in
    */etc/shadow* and whether the account is allowed to log in from wherever
    you are attempting to log in. PAM has a great deal to do with that as
    well.

    > The fact remains that PuTTY has, and still, works well with all older
    > versions of LM including 2008.0.
    >
    > So it would seem to indicate something new/different on 2008.1.


    Well, with Mandriva being a cutting edge kind of distro, you never
    know... ;-)

    --
    Aragorn
    (registered GNU/Linux user #223157)

  20. Re: SSH connection takes 30 seconds: 2008.1

    Bit Twister wrote in
    news:slrng0taq3.gov.BitTwister@wm81.home.test:

    > You can just stop the sound stuff from running on boot in mcc and also
    > just stop the service/daemon for testing.


    Thanks Bit!

    I used mcc to stop the sound stuff and to prevent it from loading on
    boot. However pulseaudio and artsd were still running after stopping the
    sound stuff.

    I killed both processes and that took a good load off of the system. But
    I'm afraid they'll be back when I reboot.

    Any way to stop that?

    Also there are several other processes running that I'm afraid to kill
    b/c I don't know what may rely on them. For example: python, kdm_greet,
    kicker, klipper, 3 (what the heck is that?), and net_applet. Those seem
    to be the biggest cpu users. The other stuff is very small.

    Thanks,


    Frank

+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast