Rsync 服务器密码文件配置指南 - /etc/rsyncd.secrets

/etc/rsyncd.secrets 是 Rsync 服务器的密码文件,用于存储允许访问 Rsync 服务器的用户和密码。以下步骤将引导您完成 /etc/rsyncd.secrets 的配置:

  1. 创建 /etc/rsyncd.secrets 文件并设置权限为 600。

touch /etc/rsyncd.secrets chmod 600 /etc/rsyncd.secrets


2. **在 /etc/rsyncd.secrets 文件中添加用户名和密码,格式为 'username:password'。**

   例如:

user1:password1 user2:password2


3. **保存 /etc/rsyncd.secrets 文件并退出。**

4. **修改 Rsync 服务器的配置文件 /etc/rsyncd.conf,添加如下配置:**

secrets file = /etc/rsyncd.secrets


5. **重启 Rsync 服务器。**

```bash
systemctl restart rsync

注意:

密码文件中的密码应该加密,可以使用 Rsync 自带的工具 rsync --password-file 生成加密后的密码。

Rsync 服务器密码文件配置指南 - /etc/rsyncd.secrets

原文地址: https://www.cveoy.top/t/topic/kWtP 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录