Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to do this on Debian ?

rahulksrahulks Member
edited December 2014 in Help

create an account for the user where the user can have access to only his folder at /home.

Comments

  • hostnoobhostnoob Veteran
    edited December 2014

    This should work. Add this to /etc/ssh/sshd_config and restart sshd

    Match User username
        ChrootDirectory /home/username/

    This will disable SSH access for them too

    Match User username
        ChrootDirectory /home/username/
        ForceCommand internal-sftp
  • More in-depth blocking

     Match User username
       ChrootDirectory %h
       ForceCommand internal-sftp
       AllowTcpForwarding no
       PermitTunnel no
       X11Forwarding no
    

    Also to prevent a normal login on the machine

    usermod -s /usr/bin/false username
    
    Thanked by 1netomx
Sign In or Register to comment.