0

I've read a lot of pages about jailing users and now I'm confused. I want to jail my users to their dirs on sftp and ssh access, so they could see only files in /home/. What solution I should use to do it in the best (and easiest as possible) way?

I'm new in linux and I still can't get it xD

  • How do you imagine jailed shell access to work? The user won't be able to run any programs unless all required binaries and executables are available in the chroot jail. – David Foerster Feb 05 '17 at 13:50

1 Answers1

0

Chrooting sftp/scp users is relatively easy, but properly chrooting ssh users will be more difficult.

For sftp/scp, this weblink should suffice. Make sure to read all the comments, not just the highest rated ones.

For chrooting ssh users, you can have a look at Jailkit. Very good, but it will require quite a lot of work and maintenance. The advantage is that Jailkit could offer both sftp and ssh for users.

Apart from this, Lshell could be interesting to add severe restrictions for ssh users, but last time I tried it, it would not limit navigation for sftp users.

albert j
  • 1,453