Never Ending Security

It starts all here

Howto Configure SFTP(SSH Settings) and SELinux Settings

  1. Configure SSHD Configure
    Match Group sftponly
    -ForceCommand internal-sftp
    -ChrootDirectory %h
  2. Restart SSHD
    #systemctl restart sshd.service

  3. Add User
    #useradd -M -g sftponly sftponlyuser

  4. Configure Chroot folder of sftponlyuser
    #mkdir -p /home/sftponlyuser/upload
    #chown sftponlyuser: /home/sftponlyuser/upload
    #restorecon -R -v /home/sftponlyuser

  5. Setting SELinux
    setsebool -P ssh_chroot_rw_homedirs on

More info on:
http://bachradsusi.livejournal.com/2239.html
http://serverfault.com/questions/581323/sftp-gives-permission-denied-only-when-chrooted

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s