SSH connection speed is slow

Source: Internet
Author: User
Tags ssh openssh server

Installing and setting up OpenSSH Server

sudo apt-get install SSH

Ubuntu then automatically downloads and installs the openssh server and resolves all dependencies together. When you are done, you can find another computer and then use an SSH client software (strongly recommended PuTTy) to enter your server's IP address. If it's all right, wait a little while to connect. And you should be able to log in with your existing username and password.

In fact, if there is no special need, the OpenSSH Server here is installed. But further setup will allow the OpenSSH to log in less time and be more secure. All of this is done by modifying the OpenSSH configuration file sshd_config.

First, you may find that when you experiment with remote logins, you will need to wait a long time to enter the password after entering the user name. In fact, this is due to the sshd need to back up the client's DNS information caused. We can dramatically increase the speed of the login by disabling this feature. First, open the Sshd_config file:

sudo nano/etc/ssh/sshd_config
Gssapiauthentication Yes--->no 81 lines 
Usedns Yes-->usedns no 122 lines around

The main thing is to disable the DNS query feature, which speeds up the SSH connection

Then restart the SSH service:

Sudo/etc/init.d/ssh Stop
sudo/etc/init.d/ssh start

Reference Links:

https://blog.csdn.net/wanruirui/article/details/14222321

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.