Speed up SSH logins by turning off the Usedns and gssapiauthentication options

Source: Internet
Author: User

From:http://www.tuicool.com/articles/jbarr3

Usually when we connect the OpenSSH server, if the USEDNS option is open, the server will be based on the client's IP address DNS PTR reverse query out the host name of the client, and then based on the queried client hostname DNS forward a record query, and verify whether the original IP addresses are consistent, and this measure prevents client spoofing. Usually we are dynamic IP does not have PTR records, so opening this option does not have much effect. We can improve the speed of connecting to the OpenSSH server by turning off this feature.

The service-side steps are as follows:
Editing a configuration file/etc/ssh/sshd_config
Vim/etc/ssh/sshd_config
Find the Usedns option, if there is no comment, comment it
#UseDNS Yes
Add to
Usedns No

Find the Gssapiauthentication option, if there is no comment, comment it
#GSSAPIAuthentication Yes
Add to
Gssapiauthentication No

Save configuration file

Restarting the OPENSSH server
/etc/init.d/sshd restart

Speed up SSH logins by turning off the Usedns and gssapiauthentication options

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.