6/29/2023 0 Comments Sftp for mac stackoverflow![]() In your example, /var/sftp and /var/sftp/usero1 needs to be owned by root and not writable by any other user According to the man page for ssh_config the variable should be accepted, per:ĬhrootDirectory accepts the tokens %%, %h, and %u. When I do that I get an error client_loop: send disconnect: Broken pipe on a login attempt. ![]() Since I want users to end up in the /var/sftp/ folder, I try setting the following config is sshd_config, under the Match Group line : ChrootDirectory /var/sftp/%u Now when I try a login I end up in the /var/sftp folder, which demonstrates login works. The sftp base folder is /var/sftp and the user was created as follows: groupadd sftpusersĬhown myuser01:myuser01 /var/sftp/myuser01 I am in the process of setting chroot for sftp and have used a combination of tutorials ( source1, source2) and have ended up with the following configuration in /etc/ssh/sshd_config: Match Group sftpusers
0 Comments
Leave a Reply. |