当前位置:网站首页>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 .
边栏推荐
- Take the intersection of two sets
- cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘
- Codeforces 474 F. Ant colony
- Implementation of mahout Pearson correlation
- 201215-03-19 - cocos2dx memory management - specific explanation "recommended collection"
- 使用高斯Redis实现二级索引
- 恶魔奶爸 B3 少量泛读,完成两万词汇量+
- 【OpenCV 例程200篇】223. 特征提取之多边形拟合(cv.approxPolyDP)
- 解决使用uni-app MediaError MediaError ErrorCode -5
- 现在网上开户安全么?想知道我现在在南宁,到哪里开户比较好?
猜你喜欢
MySQL约束之默认约束default与零填充约束zerofill
Lex & yacc of Pisa proxy SQL parsing

cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘

The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function

Jenkins user rights management

ISO 26262 - considerations other than requirements based testing
Mysql子查询关键字的使用方式(exists)

Use camunda to do workflow design and reject operations

How to meet the dual needs of security and confidentiality of medical devices?

Static analysis of software defects codesonar 5.2 release
随机推荐
Cocos2d-x game archive [easy to understand]
SQL注入报错注入函数图文详解
Is private equity legal in China? Is it safe?
Static analysis of software defects codesonar 5.2 release
国家正规的股票交易app有哪些?使用安不安全
Cantata9.0 | new features
Is it safe to open an account online now? I want to know where I can open an account in Nanning now?
[C language] advanced pointer --- do you really understand pointer?
恶魔奶爸 B3 少量泛读,完成两万词汇量+
Magic weapon - sensitive file discovery tool
Cocos2d-x 游戏存档[通俗易懂]
Codeforces Round #296 (Div. 2) A. Playing with Paper[通俗易懂]
Problems encountered in installing mysql8 for Ubuntu and the detailed installation process
Jetty:配置连接器[通俗易懂]
智能交通焕发勃勃生机,未来会呈现哪些巨变?[通俗易懂]
Hdu4876zcc love cards (multi check questions)
Devil daddy B1 hearing the last barrier, break through with all his strength
How to meet the dual needs of security and confidentiality of medical devices?
使用高斯Redis实现二级索引
ISO 26262 - considerations other than requirements based testing