当前位置:网站首页>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 .
边栏推荐
- gridView自己定义做时间排版「建议收藏」
- OpenGL super classic learning notes (1) the first triangle "suggestions collection"
- 恶魔奶爸 B1 听力最后壁垒,一鼓作气突破
- JNI primary contact
- Cocos2d-x game archive [easy to understand]
- [C language] advanced pointer --- do you really understand pointer?
- 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
- 私募基金在中国合法吗?安全吗?
- Codesonar Webinar
- Codeforces 474 F. Ant colony
猜你喜欢

【OpenCV 例程200篇】223. 特征提取之多边形拟合(cv.approxPolyDP)
SQL injection error report injection function graphic explanation

AADL inspector fault tree safety analysis module

Jenkins user rights management

解决uni-app中uni.request发送POST请求没有反应。

Validutil, "Rethinking the setting of semi supervised learning on graphs"

使用高斯Redis实现二级索引

Details of C language integer and floating-point data storage in memory (including details of original code, inverse code, complement, size end storage, etc.)

Problems encountered in installing mysql8 for Ubuntu and the detailed installation process

Solve the problem of using uni app mediaerror mediaerror errorcode -5
随机推荐
浅解ARC中的 __bridge、__bridge_retained和__bridge_transfer
FatMouse' Trade (Hangdian 1009)
Codeforces Round #275 (Div. 2) C – Diverse Permutation (构造)[通俗易懂]
2022年在启牛开中银股票的账户安全吗?
UVA 11080 – Place the Guards(二分图判定)
Mahout-Pearson correlation的实现
[uvalive 6663 count the regions] (DFS + discretization) [easy to understand]
Navicat connect 2002 - can't connect to local MySQL server through socket '/var/lib/mysql/mysql Sock 'solve
Prometheus remote_ write InfluxDB,unable to parse authentication credentials,authorization failed
神兵利器——敏感文件发现工具
Mysql子查询关键字的使用方式(exists)
Deployment, recall and deletion solutions - stsadm and PowerShell "suggestions collection"
UVA 12230 – crossing rivers (probability) "suggested collection"
Cocos2d-x 游戏存档[通俗易懂]
Is private equity legal in China? Is it safe?
Implement secondary index with Gaussian redis
EasyUI date control emptying value
[matrix multiplication] [noi 2012] [cogs963] random number generator
Focusing on safety in 1995, Volvo will focus on safety in the field of intelligent driving and electrification in the future
Automatic classification of defective photovoltaic module cells in electronic images