Search code examples
linuxsshcentosrootsshd

AllowUsers on sshd_config, forgot to put root


I edited sshd_config to deny access to SSH to some of my users, just allowing only few users. Here's what I added to the sshd_config file:

AllowUsers Name1 Name2

But I forgot to put in root (I though it was not necessary), so now I can't access to SSH with root anymore and with Name1 and Name2 I can't edit the sshd_config file, because I get Permission Denied.

I contacted my host and they told me they can't help me.

Can I get my root access back without physically accessing my dedicated server?


Solution

  • login Name1 via ssh , And su root you access by root .