Solution to slow SSH Login

Source: Internet
Author: User

The solution to slow SSH Login is my own situation. Most of these latencies are caused by GSSAPI authentication! You can use the-v option to confirm your situation. For example, the detailed Logon Process of ssh is as follows: [root @ xuekun ~] # Ssh-v xuekun@192.168.15.120 ...... debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: includeded debug1: Authentications that can continue: publickey, gssapi-with-mic, password debug1: Next authentication method: gssapi-with-mic debug1: unspecified GSS failure. minor code may provide more information No credentials cache found debug1: Unspecified GSS failure. minor code may provi De more information No credentials cache found debug1: Unspecified GSS failure. minor code may provide more information debug1: Next authentication method: publickey debug1: Trying private key:/home/xuekun /. ssh/identity debug1: Trying private key:/home/xuekun /. ssh/id_rsa debug1: Trying private key:/home/xuekun /. ssh/id_dsa debug1: Next authentication method: password xuekun@192.168.15.120's pass Word: the solution I encountered is obviously to disable GSSAPI. the following are three feasible methods: [note] the solution is tested and passed under the OpenSSH_4.7p1 centos5.8 centos6.2 client. 1. specify: ssh-o GSSAPIAuthentication = no xuekun@192.168.15.127 2. explicitly disable GSSAPI authentication in the configuration file of the ssh client program. for example, edit the/etc/ssh/ssh_config file and add or modify the following line: GSSAPIAuthentication no 3. in the root directory of the user. create a config file in the ssh directory. for example, edit/home/xuekun /. ssh/config (created if the file does not exist), add the option: GSSAPIAuthentication no [note]. /Etc/ssh/ssh_config is a global configuration file. modifications to it will affect all system users who use the ssh client. b. /home/cherry /. ssh/config only affects the local ssh client configuration file of xcl. all configuration parameters in this file will overwrite the same configuration parameters in the global configuration file. after GSSAPI is disabled, the ssh logon prompt "regression" is normal: [root @ xuekun ~] # Ssh-v xuekun@192.168.15.127 ...... debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: includeded debug1: Authentications that can continue: publickey, gssapi-with-mic, password debug1: Next authentication method: publickey debug1: Trying private key: /home/xuekun /. ssh/identity debug1: Trying private key:/home/xuekun /. ssh/id_rsa debug1: Trying private key:/home/xuekun /. ssh/id_dsa debug1: Next authentication method: password xuekun@192.168.15.127's password: visible, this process is no longer using GSSAPI. the speed is also greatly improved.

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.