Home > OS >  Tip when SSH connection closed by IP, have tried many methods but not yet
Tip when SSH connection closed by IP, have tried many methods but not yet

Time:10-01

A server via SSH -v root @ IP address B, prompt the following error,
Screen 1: with server B to normal SSH to the server; 2: hosts. Allow the configured and restart the SSHD, but no effect; 3: check the sshd_config configuration has no problem, 4: di-aping or Telnet server B are normal, requests each great god grant instruction, will,

OpenSSH_7. 9 p1, OpenSSL 1.0.1 e - fips 11 Feb 2013
Debug1: Reading configuration data,/etc/SSH/ssh_config
Debug1: Applying the options for *
Debug1: Connecting to [B] IP address IP address B port 22.
Debug1: Connection established.
Debug1:0/0 permanently_set_uid:
Debug1: identity the file/root/. SSH/identity type 1
Debug1: identity the file/root/. SSH/identity - cert type 1
Debug1: identity the file/root/. SSH/id_rsa type 1
Debug1: identity the file/root/. SSH/id_rsa - cert type 1
Debug1: identity the file/root/. SSH/id_dsa type 1
Debug1: identity the file/root/. SSH/id_dsa - cert type 1
Debug1: identity the file/root/. SSH/id_ecdsa type 1
Debug1: identity the file/root/. SSH/id_ecdsa - cert type 1
Debug1: Remote protocol version 2.0, Remote software version OpenSSH_7. 9
Debug1: match: OpenSSH_7. 9 pat OpenSSH *
Debug1: Enabling compatibility mode for protocol 2.0
Debug1: Local version string SSH - 2.0 - OpenSSH_7. 9
Debug1: SSH2_MSG_KEXINIT sent
Debug1: SSH2_MSG_KEXINIT received
Debug1: kex: server - & gt; The client either aes128 - CTR hmac - sha1 none
Debug1: kex: client - & gt; Server either aes128 - CTR hmac - sha1 none
Debug1: SSH2_MSG_KEX_DH_GEX_REQUEST (1024 & lt; 2048 & lt; 8192) sent
Debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
Debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
Debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
Debug1: the Host 'B' IP address is known and matches the RSA Host key.
Debug1, Found the key in/root/. SSH/known_hosts: 42
Debug1: ssh_rsa_verify: signature correct
Debug1: SSH2_MSG_NEWKEYS sent
Debug1: expecting SSH2_MSG_NEWKEYS
Debug1: SSH2_MSG_NEWKEYS received
Debug1: SSH2_MSG_SERVICE_REQUEST sent
Debug1: SSH2_MSG_SERVICE_ACCEPT received
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 the key: pkalg SSH - 277
rsa blenDebug1: read PEM private key done: type RSA
Connection closed by IP address B

CodePudding user response:

Look at the logs of the B, specific what reason be

CodePudding user response:

Log messages on the server's B output has an error is:
Aug 20 12:00:18 TS - NW - S07 SMBD [2855] : [2019/08/20 12:00:18. 199143, 0] printing/print_cups. C: 528 (cups_async_callback)
Aug 20 12:00:18 TS - NW - S07 SMBD [2855] : failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
Aug 20 12:13:18 TS - NW - S07 SMBD [88015] : [2019/08/20 12:13:18. 885695, 0] printing/print_cups. C: 151 (cups_connect)
Aug 20 12:13:18 TS - NW - S07 SMBD [88015] : Unable to connect to CUPS server localhost: 631 - Connection refused

The SMB. Conf configuration as follows, is related to the
The load printers=yes
Cups options=raw

; Printcap name=/etc/printcap
# obtain a list of printers automatically on SystemV
; Printcap name=the lpstat
; Printing=cups

CodePudding user response:

refer to the second floor xiaof1992 response:
log messages on the server's B output has an error is:
Aug 20 12:00:18 TS - NW - S07 SMBD [2855] : [2019/08/20 12:00:18. 199143, 0] printing/print_cups. C: 528 (cups_async_callback)
Aug 20 12:00:18 TS - NW - S07 SMBD [2855] : failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
Aug 20 12:13:18 TS - NW - S07 SMBD [88015] : [2019/08/20 12:13:18. 885695, 0] printing/print_cups. C: 151 (cups_connect)
Aug 20 12:13:18 TS - NW - S07 SMBD [88015] : Unable to connect to CUPS server localhost: 631 - Connection refused

The SMB. Conf configuration as follows, is related to the
The load printers=yes
Cups options=raw

; Printcap name=/etc/printcap
# obtain a list of printers automatically on SystemV
; Printcap name=the lpstat
; Printing=cups


Should not, you look at the log

CodePudding user response:

Secure the log and log information about the server A, but there are other server address log information is as follows:

Aug 20 12:47:27 TS - NW - S07 SSHD [90020] : pam_unix (SSHD: account) : the password for user weblogic will expire in 14 days
Aug 20 12:47:27 TS - NW - S07 SSHD [90020] : Accepted password for weblogic from port 52738 an ssh2 server C
Aug 20 12:47:27 TS - NW - S07 SSHD [90020] : pam_unix (SSHD: session) : the session the opened for user weblogic by (uid=0)
Aug 20 12:47:37 TS - NW - S07 su: pam_unix (su - l: session) : the session the opened for user root by weblogic (uid=502)

CodePudding user response:

Look at your log above, as the key is to use logs in, was rejected, can have the log should be secure,
You see B/root/. SSH/authorized_keys inside to have A record, so can consider to delete, and then to pass A public key; Or use the password to log in

CodePudding user response:

In addition, B is disabled password, or key is not successful, should also can login

CodePudding user response:

B this should not disable the password, and other server server A the same network segment is to be able to normal SSH to B;

Authorized_keys file deletion rebuild mutual trust also not line, the other is I the SSH command execution and view the log synchronized, B is not log in, very strange
  • Related