I'm trying to setup a chroot jail, but I'm not sure how to make this work in SSH and SFTP. A quick question, will something like this work for both SSH and SFTP or just SSH? If it doesn't work for both, how can I setup a chroot jail (or an alternative) to do so?
Asked
Active
Viewed 1,502 times
1 Answers
1
If SSH does a chroot, then it will be effective for all processes started by SSH.
RalfFriedl
- 8,816
- 6
- 23
- 34
-
So the answer is no? – APixel Visuals Aug 19 '18 at 04:16
-
@apxx since SFTP is handled by SSH, the answer is yes. In the post you linked, the accepted answer sets up an SFTP jail, disabling general SSH (note the `ForceCommand internal-sftp`). For general SSH access as well, you'd need something like https://unix.stackexchange.com/a/9854/70524. – muru Aug 19 '18 at 05:00