Articles in this section

It is not possible to access SSH terminal extension via root user in Plesk: ssh_exchange_identification: read: Connection reset by peer

DoNotDelete:docref Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

Plesk Admin cannot access SSH through the SSH terminal extension via root user:

PLESK_ERROR: Connection Broken 

download.png

Cause

Root login to SSH is disabled on the system level. 

Resolution

  1. Connect to the server via SSH
  2. Open /etc/ssh/sshd_config in any text editor and add the following  lines:

    CONFIG_TEXT: Match Address 127.0.0.1
    PermitRootLogin yes

  3. Restart SSH service:

    # service sshd restart

Was this article helpful?

Comments

7 comments
Date Votes
  • The problem was we can't connect to server via SSH, how can the resolution starts with "1.connect to server via SSH"?

    I tried to connect using multiple ssh clients and none was successful

    2
  • Como empieza la solución con conectese si no me puedo conectar xD

    0
  • Buenas Roky Plus este error que ves en el articulo es para la extension SSH Terminal.

    Aunque no puedas conectarte mediante la extension puedes conectarte normalmente mediante ssh via Putty en Windows o una terminal en linux/mac os.

    0
  • Hello,

    My problem is that I can connect to the server via SSH, but since I do not have root privileges, I cannot update the file you mentioned.

    0
  • Hi Berkan Kaya please contact the server provider in order to reset the access.

    0
  • When I try to run the ‘service sshd restart’ command I get this error:

    Failed to restart sshd.service: Unit sshd.service not found.

    Also should I remove this line that is already in the sshd_config file:

    PermitRootLogin no

    (I assume not as the new lines will make and exception).

     

    0
  • Nigel Hay hi, you can edit that line and replace no for yes. Or you can remove that line and a new one:

    PermitRootLogin yes


    Please check if sshd is installed:

    which sshd

    If it is not installed please do so according to your OS:

    Debian/Ubuntu:

    sudo apt update && sudo apt install openssh-server -y
    

    Centos/RHEL

    sudo yum install openssh-server -y
    

    Verify the SSH Service Name

    systemctl list-units --type=service | grep ssh
    

    Use that name in the following command:

    systemctl restart ssh.service
    0

Please sign in to leave a comment.