Disabling reverse dns lookups in ssh

Disabling reverse dns lookups in ssh

Sometimes it is very annoying to wait ten's of seconds to finish remote ssh server's reverse dns lookup procedure.

Steps to disable

1. Open configuration file /etc/ssh/sshd_config. 2. Find UseDNS directive and set value to no. 3. In case this directive is not shown in your config file, just add it to as : UseDNS no
  This directive tells sshd process to check resolved host name for the connected client's ip address maps back to the very same ip address or not. However, it does not prevent the sshd server from performing any DNS lookups at all.
4. Restart sshd service on server
In order to remove dns lookups completely, you have to use -u0 options when starting sshd server. You can easily add this options to /etc/default/ssh or /etc/sysconfig/sshd or elsewhere suitable for your distribution. -u0 option's means that it will not put hostnames into the utmp structure
    • Related Articles

    • Manage your Reverse DNS records from myaccount portal

      Custom Reverse DNS panel Login to your myaccount portal using your credentials. You can now set up Reverse DNS on your own using the DNS panel provided under the Services tab in myaccount portal. Create PTR Record for each of your Virtual Compute ...
    • Set-up SSH keys

      Introduction: Setting up SSH based security to access your server is a much more effective way than the use of a manual root password. Cracking the security system of a VPS depending on SSH keys is nearly impossible since it secures your VPS in a ...
    • How to setup up your DNS records ?

      Introduction: This is an illustrative article, which will walk you through the procedure of setting up your DNS records via e2enetworks platform. DNS (Domain Name System) is a very significant sector of the internet. DNS records must be configured ...
    • Manage your DNS records from myaccount portal

      DNS panel Login to your myaccount portal using your credentials. You can now set up DNS on your own using the DNS panel provided under the Services tab in myaccount portal. Now you have access to all your DNS records which can be modified by yourself ...
    • SSH::Generating a Key Pair for MAC

      Generating SSH keys on Mac OS X The following outlines the process of setting up key-based SSH login on Mac OS X and Mac OS X Server. To set up key-based SSH, you must generate the keys the two computers will use to establish and validate the ...