Get the App
SLTechnology News&Howtos  ›  Servers  › 

How does CentOS speed up SSH login

Shulou Source: shulou.com Published: 2022-06-01 11:16:51 10月02日 Update

This article mainly introduces "CentOS how to speed up SSH login speed", in daily operation, I believe many people in CentOS how to speed up SSH login problems have doubts, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "CentOS how to speed up SSH login speed" doubts helpful! Next, please follow the small series to learn together!

Friends who log into SSH frequently can feel that every time they log into SSH, they always have to wait for a while to connect. This is because OpenSSH server has a DNS lookup option UseDNS which is turned on by default.

When UseDNS option is turned on, when the client tries to log in to SSH server, the server first performs DNS PTR reverse query based on the client IP address to find out the client host name, and then performs DNS forward A record query based on the client host name to verify whether it is consistent with its original IP address. This is a measure to prevent client spoofing, but generally our dynamic IP does not have PTR records. Turning on this option is just a waste of time. It is better to turn it off.

I. Editing documents

vim /etc/ssh/sshd_config

Second, find the following characters

#UseDNS yes

Create a new line below it and fill in

UseDNS no

3. Save and restart SSH

service sshd restart

A few simple steps and it's done.

At this point, the study of "CentOS how to speed up SSH login" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Tags: Login customer speed learning client server service query host address more end this is help original practical consistent next one line dynamic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Microsoft Apple Docker OPPO Reno