On the case of Linux ssh suddenly can not connect

The company's Linux servers are jumping through a JumpServer. When Jumpserver (open source springboard systems) for personal use, sometimes due to the need to upload and download files very easily. Due to the arrangement relationship, generally can not be connected directly to the server using ssh SecureCRT. So personally I set up / etc / ssh / sshd_config. Allow my computer (computer name + domain name) directly using ssh access Linux host.

 

But today prompt for password validation error, use JumpServer stepping stones of course can be connected when using SecureCRT connection. After connecting up the inspection and analysis reasons, using the following procedure:

 

image

 

First look if there has modified password, as shown below, last modified password has been for a long time. Recently I have not changed the password, and I use SecureCRT to use saved passwords, not entered manually. Therefore, although the prompt " Password verification failed " , but the actual situation should be cause for other reasons (not because the password is incorrect reasons)

 

#chage -l oracle
Last password change                                    : Feb 24, 2019
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7

 

Check the / var / log / secure log and found that my computer (IP address and other information made desensitization treatment) does not allow this server via ssh connection

 

Jul 24 11:41:25 xxxxx sshd[30836]: User oracle from 192.168.xxx.xxx not allowed because not listed in AllowUsers
Jul 24 11:41:25 xxxxx sshd[30839]: input_userauth_request: invalid user oracle
Jul 24 11:41:25 xxxxx sshd[30836]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.xxx.xxx  user=oracle
Jul 24 11:41:27 xxxxx sshd[30836]: Failed password for invalid user oracle from 192.168.xxx.xxx port 63278 ssh2
Jul 24 11:41:30 xxxxx sshd[30839]: Received disconnect from 192.168.xxx.xxx: 13: The user canceled authentication.

 

 

But I am in / etc / ssh / sshd_config configuration file inside, I've set up to allow my PC (this notebook has joined the company's domain) access to this Linux servers.

 

AllowUsers *@xxxx.xxx.xxxx.com

 

When using ping xxx.xxx.xxx.com test, found that the computer name can not be resolved, and finally determined to be abnormal because the DNS server, making it impossible to resolve the name of my machine, causing ssh connection to the host when this error. In fact, the very beginning, / etc / ssh / sshd_config is using the IP address configuration. However, because IP addresses sometimes get the notebook is changed. So arranged / etc / ssh / sshd_config used inside the machine name. DNS results are abnormal when, out of the sub-file such a thing.

Guess you like

Origin www.cnblogs.com/kerrycode/p/11237186.html