Slow Authentication when SSH Connecting To Your Ubuntu Box

I noticed a dramatic slower authentication process when doing ssh connection to my Ubuntu box than connecting to CentOS box.
time ssh 102.14.98.241
After logging in, type exit and it reveal the time consumed as the following:
real 0m30.397s
user 0m0.012s
sys  0m0.020s
After little research I found modify one line in /etc/ssh/sshd_config could fix the problem.
sudo vim  /etc/ssh/sshd_config
# add the following line
UseDNS no
#save file and restart sshd server
sudo /etc/init.d/ssh restart
Test the new time consuming, use time ssh 102.14.98.241 shows
real 0m5.309s
user 0m0.013s
sys  0m0.015s

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...