Linux user with SSH read-only access to one folder?

P

postcd

Guest
Hello,

i would like to have an "backup" user who will have read-only SSH access to the folder /backup which is used to store server data backups. User will download data from that folder subfolders via SCP.

Please what is the simplest and quite secure way to achive it, can you please share commands? Thank you
 


1. Create a user account that can only read from a directory D.
2. Enable CHROOT in sshd and set it to D.
Code:
 Subsystem      sftp    D
3. Something like this for user Access:
Code:
Match User username
  ChrootDirectory D
  AllowTcpForwarding no
  PermitTunnel no
  X11Forwarding no
 
im not sure where should i paste yours mentioned data on my RHEL
 

Members online


Top