ssh problem

Discussion in 'ISPConfig 3 Priority Support' started by Tom John, Dec 11, 2020.

  1. Tom John

    Tom John Active Member HowtoForge Supporter

    Hi guys,
    i use ubuntu 20.04 and ISPConfig 3.2
    in sshd_config i put PermiRootLogin without password.
    i have in .ssh/authorized keys my rsa key from the other server and from my workstation.
    suddenly i can not access to the server with root account not from my workstation not from other server.
    however i have access with another user so the server is not lost.
    my question is how can it happen that from one moment to the other i have no access per ssh root?
    i changed the sshd_config to PermitRootAccess to yes so now i can access the server, but when i turn that back into without password, i have no access even the key i in .ssh/authorized keys.
    anyone have an idea how to solve that?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try this exact line:

    Code:
    PermitRootLogin prohibit-password
    and double-check that your public key in /root/.ssh/authorized_keys is correct.
     
  3. Tom John

    Tom John Active Member HowtoForge Supporter

    thanks for your answer.

    it does not work.
    i did copy the public key again so it should work.
    the problem happened suddenly from 2 server at the same time so i checked as well fail2ban but the ip is not banned and moreover i have access if i put PermitRootLogin to yes i can access.
    but this is not safe so i dont know who to fix this now
     
    Last edited: Dec 11, 2020
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Maybe you updated the server and it is now using settings that prohibit your old key? What do the server logs show when it denies access? You can run your client in verbose mode and it might provide some clues.
     
  5. Tom John

    Tom John Active Member HowtoForge Supporter

    i found out that the owner was wrong on .ssh, it came from copy and then the owner changed. I changed it back to root and now i have access and the key is working.
    thanks for your help and have a nice day
     
    ahrasis likes this.

Share This Page