A friend of my needs access to some files. He is a good friend, but he is often infected with viruses and like to mess with things he is not supposed to.
I also do not want him to read other parts of my system.
Since my friend is not connected to my LAN and I have only one public ip address I decided to create something with a combination of rssh and chroot.
I created a new user "roy", added him to the group olavsFriends, set rssh as login shell and set his home folder to /home/chroot/roy. Finally I added this to the bottom of the /etc/ssh/sshd_config file
I found out that I missed some files that were required by rssh and copied them into the /home/chroot folder
Then it worked, when he log in the "root" is now /home/chroot
Is this safe enough?
Is it possible to chroot his home folder /home/chroot/roy and keep the rssh files in /home/chroot?
I also do not want him to read other parts of my system.
Since my friend is not connected to my LAN and I have only one public ip address I decided to create something with a combination of rssh and chroot.
I created a new user "roy", added him to the group olavsFriends, set rssh as login shell and set his home folder to /home/chroot/roy. Finally I added this to the bottom of the /etc/ssh/sshd_config file
Code:
Match Group olavsFriends
ChrootDirectory /home/chroot/
AllowTcpForwarding no
ForceCommand internal-sftp
X11Forwarding no
I found out that I missed some files that were required by rssh and copied them into the /home/chroot folder
Then it worked, when he log in the "root" is now /home/chroot
Is this safe enough?
Is it possible to chroot his home folder /home/chroot/roy and keep the rssh files in /home/chroot?