Error: User modify failed. Cannot modify user on other node: Authentication by SSH key failed!

Error: User modify failed. Cannot modify user on other node: Authentication by SSH key failed!

 

Check the following on slave/secondary node

 

1. The error ’User modify failed Cannot modify user on other node: Authentication by ssh key failed’ would occur when the ezeelogin installed node has its public key missing in /root/.ssh/authorized_keys. To add the key, execute the following command 

cat /usr/local/etc/ezeelogin/id_clkey.pub >> /root/.ssh/authorized_keys

 

Check if the key is back in the file.

cat /root/.ssh/authorized_keys

 

2. Also, make sure that the port sshd is listening on the servers is given as the gateway port in Settings->General->Miscellaneous->Gateway SSH port

3. Also, make sure PubkeyAuthentication is set to ’YES’ in you sshd_config (sshd configuration) file. In Centos/RHEL/Fedora it would be

vi /etc/ssh/sshd_config

#set PubkeyAuthentication to yes

PubkeyAuthentication yes

service sshd restart

 

3. Also, make sure root login is permitted on the gateway server.

 

You can check this by doing

ssh root@localhost

and it should log you in else edit /etc/ssh/sshd_config and set  PermitRootLogin yes 

vi /etc/ssh/sshd_config

#Add the following lines to the end of  /etc/ssh/sshd_config to allow root login from localhost only

 Match Address 127.0.0.1

 PermitRootLogin yes

 service sshd restart

 and make sure you are able to authenticate with the the command 

ssh root@localhost

Make sure you are able to login after entering the password.

If you have enabled Allow Or Deny SSH Access To A Particular User Or Group in sshd.conf, make sure that the user root is allowed

  4. Also, make sure that the webuser(apache,nobody.etc) that the webserver(apache/nginx) runs as is able to read the keys in the dir /usr/local/etc/ezlogin.

  Make sure to grant the read privileges to

chmod o r /usr/local/etc/ezlogin/id_clkey
chmod o r /usr/local/etc/ezlogin/id_clkey.pub
or
usermod -G <current_groupname_of_id_clkey_files> <webserver_user>

5. Check the log file /var/log/secure

       tail  /var/log/secure

 

 

6. Reset Ezeelogin keys used for privilege escalation

 

     Reset Ezeelogin Authorization Keys

 

 

 

 

 

0 (0)
Article Rating (No Votes)
Rate this article
    Attached Files
    There are no attachments for this article.
    Related Articles RSS Feed
    Can’t connect to local MySQL server through socket ’3306 ’ in ezsh.log
    Viewed 2208 times since Thu, Jun 15, 2017
    Failed to Connect to IP: Permission Denied cPanel / WHM login
    Viewed 3324 times since Thu, Jun 15, 2017
    Error while logging with saml credentials
    Viewed 78 times since Fri, Sep 25, 2020
    web interface very slow to load
    Viewed 879 times since Wed, Sep 19, 2018
    "Blank page" error in webssh console
    Viewed 1712 times since Tue, Jan 30, 2018
    sshd[3167]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
    Viewed 1355 times since Mon, Apr 27, 2020
    Error: User add failed. Cannot add user on this node: FAILED: to establish SSH session
    Viewed 1346 times since Thu, Sep 6, 2018
    User add failed Cannot add user on this node: REMOTE HOST IDENTIFICATION HAS CHANGED!
    Viewed 4401 times since Wed, Jun 14, 2017
    Unable to add server into Ezeelogin via webinterface. Password error, times out
    Viewed 2244 times since Wed, Jun 14, 2017
    "Error: LDAP extension is not installed".
    Viewed 2802 times since Fri, Sep 8, 2017