当前位置:网站首页>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 .
边栏推荐
- 解决使用uni-app MediaError MediaError ErrorCode -5
- ISO 26262 - considerations other than requirements based testing
- Micro service remote debug, nocalhost + rainbow micro service development second bullet
- Feature generation
- Jenkins user rights management
- 恶魔奶爸 A3阶段 近常速语流初接触
- The difference between NPM uninstall and RM direct deletion
- Reinforcement learning - learning notes 8 | Q-learning
- L2:ZK-Rollup的现状,前景和痛点
- Demon daddy B3 read extensively in a small amount, and completed 20000 vocabulary+
猜你喜欢
Usage of MySQL subquery keywords (exists)
Mysql子查询关键字的使用方式(exists)
L2:ZK-Rollup的现状,前景和痛点
Lex & yacc of Pisa proxy SQL parsing
ISO 26262 - considerations other than requirements based testing
95年专注安全这一件事 沃尔沃未来聚焦智能驾驶与电气化领域安全
Jenkins user rights management
How to meet the dual needs of security and confidentiality of medical devices?
[200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)
Validutil, "Rethinking the setting of semi supervised learning on graphs"
随机推荐
Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?
MySQL约束之默认约束default与零填充约束zerofill
Implement secondary index with Gaussian redis
现在网上开户安全么?想知道我现在在南宁,到哪里开户比较好?
Deadlock conditions and preventive treatment [easy to understand]
Backup tidb cluster to persistent volume
Codeforces Round #296 (Div. 2) A. Playing with Paper[通俗易懂]
Feature generation
What is the reason for the abnormal flow consumption of 4G devices accessing the easygbs platform?
【矩阵乘】【NOI 2012】【cogs963】随机数生成器
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
Codeforces 474 F. Ant colony
The maximum number of meetings you can attend [greedy + priority queue]
神兵利器——敏感文件发现工具
Is embedded system really safe? [how does onespin comprehensively solve the IC integrity problem for the development team]
South China x99 platform chicken blood tutorial
使用高斯Redis实现二级索引
Hdu4876zcc love cards (multi check questions)
Mysql子查询关键字的使用方式(exists)
Is private equity legal in China? Is it safe?