Linux server logon slow to appear in Dayton

Source: Internet
Author: User
Tags reverse dns

Use SSH to telnet to Linux after entering the user name after several seconds before the input password. Serious impact on productivity. Logon is slow, log on up after the normal speed, the main reason for this situation is: DNS Reverse resolution problem

SSH at the time of login generally we enter the IP address of the server. It uses reverse DNS to find the hostname based on the IP, then uses DNS to find the IP address, and finally matches the logon IP is legitimate. If the IP does not have a domain name, or if the DNS server is slow or not, logging in will take time.

Workaround:

Modify the SSHD server-side configuration on the target server and restart the sshd

Vi/etc/ssh/sshd_config, set Usedns to No

There is no delay when you telnet to the machine.

modifying scripts

#!/bin/bash#===============================================================================# # file:ssh_dns.bash## USAGE:SSHusedns Parameter Modification script## description:to ModifySSHusedns parameter## BUGS:---# NOTES:---# author:paul_hch # MAIL: # CREATED: to/ -/ .  the: the: topm# VERSION:1.0#===============================================================================#备份sshd_configCP-a/etc/SSH/sshd_config/etc/SSH/Sshd_config.bakif[[ $? =0]]; ThenEcho-E'\e[1;32mthe sshd_config backup successfully! \e[0m'Echo ""    ElseEcho-E'\e[1;31mthe sshd_config Backup failed! Please check it out.\e[0m'Echo ""Exitfi#查看目前的USEDNS参数Echo-E'\e[1;32mthe sshd_config usedns Parameter now: \e[0m'grepdns/etc/SSH/sshd_config# Modifying Parameterssed-I.'s/#UseDNS yes/usedns no/'/etc/SSH/Sshd_configif[[ $? =0]]; ThenEcho-E'\e[1;32mthe usedns Parameter modification successfully! \e[0m'grepdns/etc/SSH/Sshd_configEcho ""    ElseEcho-E'\e[1;31mthe usedns Parameter modification failed! Please check it out.\e[0m'Echo ""Exitfi#重启sshd服务Echo-E'\e[1;32mthe sshd is restarting now: \e[0m'Service sshd Restart

Linux server logon slow to appear in Dayton

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.