1

I want to limit the users to their file. I added the following lines to the sshd configuration file.

Match user user1 user2 user3         
        ChrootDirectory /home/%u/
        ForceCommand internal-sftp
        X11Forwarding no
        AllowTCPForwarding no

When I do "service ssh restart" the following error is displayed :

"Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details. ".

If I put a single user it works, but how do I add multiple users ?

2

You can use the sudo /usr/sbin/sshd -t command to check for syntax errors in your configuration file.

In the present case, I believe your Match line should be:

Match User user1,user2,user3

Note the use of commas.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.