Skip to content

Shell scripts for managing (i.e. create/delete) SFTP users in CHROOT JAIL Environment.

License

Notifications You must be signed in to change notification settings

laxman-singh/CHROOT-SFTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CHROOT-SFTP

Shell scripts for managing (i.e. create/delete) SFTP users in CHROOT JAIL Environment.

Script successfully tested on Fedora 23, RedHat Enterprise Linux 6.x.

SFTP Configuration:

Dependencies: OpenSSH
Configuration:

  • Edit /etc/ssh/sshd_config
    # sudo vim /etc/ssh/sshd_config
  • Comment existing Subsystem:
    # Subsystem sftp /usr/lib/openssh/sftp-server
  • Add at end of sshd_config file, add the following lines:
    Subsystem sftp internal-sftp
    Match Group sftpusers
      ChrootDirectory /opt/sftp/%u
      ForceCommand internal-sftp
      X11Forwarding no
      AllowTcpForwarding no
  • Create SFTP CHROOT Directory and add SFTP Group :
    # mkdir /opt/sftp/
    # groupadd sftpusers

About

Shell scripts for managing (i.e. create/delete) SFTP users in CHROOT JAIL Environment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages