# PermitRootLogin no AND yes in sshd\_config

**URL:** <https://forum.yunohost.org/t/permitrootlogin-no-and-yes-in-sshd-config/23338>\
**Category:** Core dev\
**Tags:** config, english\
**Created:** [January 29, 2023, 8:41pm UTC](https://forum.yunohost.org/t/permitrootlogin-no-and-yes-in-sshd-config/23338 "2023-01-29T20:41:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![punkyard](https://forum.yunohost.org/user_avatar/forum.yunohost.org/punkyard/32/7455_2.png) [@punkyard](https://forum.yunohost.org/u/punkyard)\
**Post date:** [January 29, 2023, 8:41pm UTC](https://forum.yunohost.org/t/permitrootlogin-no-and-yes-in-sshd-config/23338/1 "2023-01-29T20:41:08Z")

</div>

hi, I’ve just installed YNH on my contabo VPS … amazing work!

I just took a look in /etc/ssh/sshd\_config  
where I read:

> Using regular users in combination with /bin/su or /usr/bin/sudo ensure a clear audit track.  
> LoginGraceTime 120  
> **PermitRootLogin no**

and further down:

> Match Address 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,169.254.0.0/16,fe80::/10,fd00::/8  
> **PermitRootLogin yes**

It didn’t seem normal to me, so I wanted to let you know.  
Correct me if i’m wrong, please!

---

<div class="post-metadata">

**Author:** ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)\
**Post date:** [January 29, 2023, 8:45pm UTC](https://forum.yunohost.org/t/permitrootlogin-no-and-yes-in-sshd-config/23338/2 "2023-01-29T20:45:26Z")

</div>

Yes, there’s a comment explaining why this is here … [yunohost/sshd\_config at dev · YunoHost/yunohost · GitHub](https://github.com/YunoHost/yunohost/blob/dev/conf/ssh/sshd_config#L108-L112)

---

<div class="post-metadata">

**Author:** ![punkyard](https://forum.yunohost.org/user_avatar/forum.yunohost.org/punkyard/32/7455_2.png) [@punkyard](https://forum.yunohost.org/u/punkyard)\
**Post date:** [January 29, 2023, 8:50pm UTC](https://forum.yunohost.org/t/permitrootlogin-no-and-yes-in-sshd-config/23338/3 "2023-01-29T20:50:43Z")

</div>

thanks @Aleks!  
I didn’t quite understand the preceding text  
but now I guess when LDAP is down, root access is granted again …  
all right!
