mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Reduce right given to ynh users with ssh (#1050)
* [fix] Avoid ynh user to be able to use X11 forwarding * [fix] Avoid some bad situations * [fix] Remove chroot restrictions and x11 authorization * Update comments Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
d49f1ce733
commit
1b62ce0240
1 changed files with 13 additions and 6 deletions
|
@ -66,12 +66,19 @@ AcceptEnv LANG LC_*
|
|||
|
||||
# SFTP stuff
|
||||
Subsystem sftp internal-sftp
|
||||
Match User sftpusers
|
||||
ForceCommand internal-sftp
|
||||
ChrootDirectory /home/%u
|
||||
AllowTcpForwarding no
|
||||
GatewayPorts no
|
||||
X11Forwarding no
|
||||
|
||||
# Forbid users from using their account SSH as a VPN (even if SSH login is disabled)
|
||||
AllowTcpForwarding no
|
||||
AllowStreamLocalForwarding no
|
||||
|
||||
# Disable .ssh/rc, which could be edited (e.g. from Nextcloud or whatever) by users to execute arbitrary commands even if SSH login is disabled
|
||||
PermitUserRC no
|
||||
|
||||
Match User admin,root
|
||||
AllowTcpForwarding yes
|
||||
AllowStreamLocalForwarding yes
|
||||
PermitUserRC yes
|
||||
|
||||
|
||||
# root login is allowed on local networks
|
||||
# It's meant to be a backup solution in case LDAP is down and
|
||||
|
|
Loading…
Add table
Reference in a new issue