Someone have the correct configuration to enable the logging using chroot users, I was looking in internet and forums but I cant enable the SFTP logging, If I dont use the Chroot I can enable the SFTP logging, I was looking arround 2 weeks but is impossible
Program: OpenSSH server
Please help
SFTP Logging using Chroot users in CentOS 7.9
Re: SFTP Logging using Chroot users in CentOS 7.9
there was a question about /etc/shells, nologin and ftp users
i don´t know if it has something to do with sftp...
i don´t know if it has something to do with sftp...
-
- Posts: 3
- Joined: 2021/11/22 14:20:57
Re: SFTP Logging using Chroot users in CentOS 7.9
Hello,
below my script to enable a new sftp user:
vi /etc/ssh/sshd_config
service sshd restart
I don't know if this is the information you need but with this configuration, all user actions will be logged in /var/log/secure
below my script to enable a new sftp user:
Code: Select all
adduser my_user
passwd my_user
chown root:my_user /home/my_user
chmod 750 /home/my_user
mkdir /home/my_user/upload
chown my_user:my_user /home/my_user/upload
ls -ld /home/my_user/upload
Code: Select all
==>
Match User my_user
ChrootDirectory /home/my_user
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
I don't know if this is the information you need but with this configuration, all user actions will be logged in /var/log/secure