Reasons for slow SSH Login

Source: Internet
Author: User

Many people have encountered the cause of slow SSH Login. I have summarized four methods I have encountered to speed up ssh, for different situations, there may be only one suitable for you. The following uses Debian and as an example:
1. Disable reverse resolution of ssh dns. You don't have to talk about the principle.

  1. Vim/etc/ssh/sshd_config

CopyCode

Add at the end of the file

  1. Usedns No

Copy code

2. add host ing in/etc/hosts, and view Debian from/etc/hostname. Ensure that the names of hosts in the two files are consistent; view RedHat from/etc/sysconfig/Network
3.For local virtual machines only:
When you install VMware or virtualbox on your local machine, there will be two more virtual NICs, one is host-only and the other is Nat. When you use one of the modes, when you log on to the Virtual Machine Linux through SSH, you will first try to connect to the virtual machine using your local network (that is, the NIC address used for Internet connection). Of course, the connection is unsuccessful, it will time out. When you connect again, it will usually succeed. This time, you are using the corresponding virtual Nic mode.
4. Disable gssapi User Authentication

  1. Vim/etc/ssh/ssh_config

Copy code

Set

  1. Gssapiauthentication Yes

Copy code

Change

  1. Gssapiauthentication No

Copy code

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.