Restart rvice to re-read the configuration file. # useradd -g sshusers -d /var/lib/jail fooĪdd the following to the end of /etc/ssh/sshd_config to enable the share and to enforce the restrictions: Create an unprivileged userĬreate the share user and setup a good password: Tip: Consider adding an entry to /etc/fstab to make the bind mount survive a reboot. # mount -o bind /mnt/data/share /var/lib/jail It is owned by root and has octal permissions of 755. In this example, /mnt/data/share is to be used. Optionally, bind mount the filesystem to be shared to this directory. Users with this type of setup may use SFTP clients such as filezilla to put/get files in the chroot jail. ![]() This can be useful to simply share some files without granting full system access or shell access. Sysadmins can jail a subset of users to a chroot jail using openssh thus restricting their access to a particular directory tree. ![]() Secure file transfer protocol (SFTP) with a chroot jail Many standard FTP programs should work as well. Once running, SFTP is available by default.Īccess files with the sftp program or SSHFS. 2 Secure file transfer protocol (SFTP) with a chroot jail.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |