Articles in this section

Error appears in Plesk SSH Terminal extension: ssh_exchange_identification: read: Connection reset by peer

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Error appears in Plesk SSH Terminal extension:

    PLESK_ERROR: ssh_exchange_identification: read: Connection reset by peer

    mceclip0.png
  • In/var/log/fail2ban.log, the following output found:

    CONFIG_TEXT: fail2ban.filter        [XXXXX]: INFO    [ssh] Ignore 127.0.0.1 by ignoreself rule
    fail2ban.filter        [XXXXX]: INFO    [ssh] Ignore 127.0.0.1 by ignoreself rule

  • In /var/log/secure the following output is found:

    CONFIG_TEXT: server sshd[XXXXX]: refused connect from 127.0.0.1 (127.0.0.1)
    server sshd[XXXXX]: refused connect from 127.0.0.1 (127.0.0.1)

  • Fail2ban configuration has the following parameters set up:

    CONFIG_TEXT: # "ignorself" specifies whether the local resp. own IP addresses should be ignored
    # (default is true). Fail2ban will not ban a host which matches such addresses.
    ignorself = true

    # "ignoreip" can be a list of IP addresses, CIDR masks or DNS hosts. Fail2ban
    # will not ban a host which matches an address in this list. Several addresses
    # can be defined using space (and/or comma) separator.
    ignoreip = 127.0.0.1/8 ::1

Cause

Custom configurations causing refused connections from localhost (127.0.0.1)

Resolution

  1. Login to the server via SSH
  2. Open /etc/hosts.allow in any text editor and allow connections from localhost by adding:

    CONFIG_TEXT: sshd: 127.0.0.1 

  3. Reload the sshd service:

    # systemctl reload sshd

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.