Results 1 to 2 of 2

Thread: SSH access USER with chroot

  1. #1
    Join Date
    Feb 2017
    Posts
    1

    SSH access USER with chroot

    I need to make a chroot users in DirectAdmin
    DirectAdmin Values
    Compiled on CentOS 7.0 64-Bit
    Server Version 1.51.2
    Current Available Version 1.512000
    OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013


    when I put chekbox in panel DirectAdmin Modify User > SSH Access

    I have a record in the file /etc/ssh/sshd_config
    AllowUsers user_test

    Where can I change this template?

    I need change:
    AllowUsers user_test
    to:
    Add the following
    Match User |USER|
    X11Forwarding no
    AllowTcpForwarding no
    ChrootDirectory /home/|USER|
    ...

    in /usr/local/directadmin/data/templates/ I have not found anything suitable to me

    Just when you create a user I need to add more folders in the root directory of the user.
    /home/user_test/bin
    /home/user_test/dev
    ...

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,348
    Hello,

    Use the hooks in Directadmin:

    user_create_post.sh - Runs AFTER the user is created.


    Related: https://www.directadmin.com/features.php?id=183
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •