SSH login delay

  • sometime ago i had a problem with login to SSH - it takes a long time > 1minute to accessing the system this problems appears every day and cost me much time with waiting so i was fixing this problem


    open the file sshd.config >> nano /etc/ssh/sshd_config


    add the command


    UseDNS no


    save and close this file then open the resolv.conf >> nano /etc/resolv.conf


    add the command
    options single-request-reopen


    save and close this file now restart the ssh deamon /etc/init.d/sshd restart
    after that you can login instand to the system


    Why this delay happends >> it is a "problem" on most Linux Distribution and has to do with the DNS check if you add this command the SSH deamon will not run a DNS check (it could make the system a little bit unsecure but if the system is only reachable with Port 22 over the Network i think this will not be a problem)

  • Yep, that is the main issue. If the DNS config is jeopardized, all the network processes will having issues (like apache etc.).
    Of cause you can disable the DNS check, without any issue. It will only result in an log file with IP addresses in there with no hostname.


    It does not raise any security issues. You simply cannot use hostnames anywhere to authenticate. Use IPs, which is not really user convenient :)

    Everything is possible, sometimes it requires Google to find out how.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!