当前位置:网站首页>Debugging and handling the problem of jamming for about 30s during SSH login
Debugging and handling the problem of jamming for about 30s during SSH login
2022-07-07 21:34:00 【Qiang Junen】
One 、 Problem description
Intranet ssh When it's a mainframe , Always get stuck 30s You can jump to the remote host around , Other hosts ssh All normal , There is no special difference in the configuration of each host , Next, let's analyze the possible reasons for how to locate the host
ssh With symmetry, you need to encrypt , Use public key (public key): The act of providing data encryption to a remote host , Everyone can get your public key to encrypt data ; Private key (private key): The remote host uses your public key to encrypt data , The private key can be used to decrypt on the local side .
Two 、 Analyze and process
1) Command options debugging
-o GSSAPIAuthentication=no or -o strictHostKeyChecking=no Option to proceed ssh Log on to the test .
debug1: SSH2_MSG_SERVICE_ACCEPT received //ssh Carton appears here , You can find it from below , stay GSS During the certification process , Tried many times , It is best to use key pair
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
2) modify GSS authentication
vim /etc/ssh/sshd_config // The notes are as follows 2 That's ok , Verification failed
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
3) Verify the discovery again after restart , There is still a jam , The Caton points are as follows :
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received // Carton still appears here
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = zh_CN.UTF-8
Compare the log of the normal Login Host , No abnormality was found ; The normal host is used immediately GSS There is no jam in the certification , The only difference is that the Caton host uses something else ssh port ; contrast /etc/pam.d/sshd It's the same , No similarities and differences are found ;
4) close DNS analysis , edit /etc/ssh/sshd_config , modify UseDNS no, The test verification login is no longer stuck . That is, on-site verification :ssh Default on DNS Analytic , Even if it is not configured as yes;
5) It has been tested and verified that , Turn on GSS Certification does not lead to this ssh Reason for logging in to Caton ,UseDNS Options are the main direct reason for this ; But other normal hosts are not turned on or running ssh Sign in , The difference between the affected host and other normal hosts is that the host name has been modified , Not by default localhost 了 , however ping The test still shows normal .
notes :UseDNS Characteristic is SSH Security enhancement features of services , The default is on . After opening , The server will start with the client IP Conduct DNS PTR Reverse query , Get the client hostname . Then according to the obtained client hostname DNS positive A Record query , Finally, the comparison results IP With primordial IP Is it consistent , To prevent client spoofing . Especially enable GSSAPI After certification , It needs the help of domain name for identity authentication .
边栏推荐
- The maximum number of meetings you can attend [greedy + priority queue]
- An overview of the latest research progress of "efficient deep segmentation of labels" at Shanghai Jiaotong University, which comprehensively expounds the deep segmentation methods of unsupervised, ro
- Automatic classification of defective photovoltaic module cells in electronic images
- Codeforces round 275 (Div. 2) C – diverse permutation (construction) [easy to understand]
- Solve the problem of using uni app mediaerror mediaerror errorcode -5
- Focusing on safety in 1995, Volvo will focus on safety in the field of intelligent driving and electrification in the future
- Description of the difference between character varying and character in PostgreSQL database
- gridView自己定义做时间排版「建议收藏」
- 恶魔奶爸 A0 英文零基础的自我提升路
- UVA 11080 – place the guards
猜你喜欢
Validutil, "Rethinking the setting of semi supervised learning on graphs"
Is embedded system really safe? [how does onespin comprehensively solve the IC integrity problem for the development team]
Ten thousand word summary data storage, three knowledge points
Details of C language integer and floating-point data storage in memory (including details of original code, inverse code, complement, size end storage, etc.)
The little money made by the program ape is a P!
Focusing on safety in 1995, Volvo will focus on safety in the field of intelligent driving and electrification in the future
SQL注入报错注入函数图文详解
恶魔奶爸 B3 少量泛读,完成两万词汇量+
Jenkins user rights management
The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function
随机推荐
How to meet the dual needs of security and confidentiality of medical devices?
The maximum number of meetings you can attend [greedy + priority queue]
Implement secondary index with Gaussian redis
权限不足
【OpenCV 例程200篇】223. 特征提取之多边形拟合(cv.approxPolyDP)
Ubuntu安装mysql8遇到的问题以及详细安装过程
Is private equity legal in China? Is it safe?
C language helps you understand pointers from multiple perspectives (1. Character pointers 2. Array pointers and pointer arrays, array parameter passing and pointer parameter passing 3. Function point
浅解ARC中的 __bridge、__bridge_retained和__bridge_transfer
What is the reason for the abnormal flow consumption of 4G devices accessing the easygbs platform?
使用枚举实现英文转盲文
Cocos2d-x game archive [easy to understand]
How to meet the dual needs of security and confidentiality of medical devices?
Problems encountered in installing mysql8 for Ubuntu and the detailed installation process
L2:ZK-Rollup的现状,前景和痛点
MySQL约束之默认约束default与零填充约束zerofill
Le capital - investissement est - il légal en Chine? C'est sûr?
Intelligent transportation is full of vitality. What will happen in the future? [easy to understand]
South China x99 platform chicken blood tutorial
Using enumeration to realize English to braille