This commit is contained in:
nick 2018-05-04 10:01:58 +08:00
parent 3b7420e552
commit cadd040942
2 changed files with 5 additions and 4 deletions

View File

@ -6,9 +6,9 @@ Linux下的任务调度分为两类系统任务调度和用户任务调度。
用户任务调度:用户定期要执行的工作,比如用户数据备份、定时邮件提醒等。 用户任务调度:用户定期要执行的工作,比如用户数据备份、定时邮件提醒等。
`/etc/cron.deny` 该文件中所列用户不允许使用 crontab 命令,默认不存在 `/etc/cron.deny` 该文件中所列用户不允许使用 `crontab` 命令,亲测 Ubuntu16.04 默认不存在CentOs7.2 存在
`/etc/cron.allow` 该文件中所列用户允许使用 `crontab` 命令,默认不存在 `/etc/cron.allow` 该文件中所列用户允许使用 `crontab` 命令,亲测 Ubuntu16.04 、CentOs7.2 存在默认不存在
`/var/spool/cron/` 所有用户 `crontab` 文件存放的目录,以用户名命名 `/var/spool/cron/` 所有用户 `crontab` 文件存放的目录,以用户名命名

View File

@ -10,8 +10,9 @@ scp id_rsa.pub root@ip地址:文件保存路径
cat id_rsa.pub >> /root/.ssh/authorized_keys 追加到文件中 cat id_rsa.pub >> /root/.ssh/authorized_keys 追加到文件中
``` ```
> 如果 .shh 目录或 authorized_keys 文件不存在需要自己新建
第三步,修改服务器端 ssh 配置文件 sshd_config 第三步,修改服务器端 ssh 配置文件 /etc/ssh/sshd_config
``` ```
RSAAuthentication yes #开启RSA验证 RSAAuthentication yes #开启RSA验证
@ -20,7 +21,7 @@ PasswordAuthentication no #禁止使用密码验证登录
chmod 600 /root/.ssh/authorized_keys #为了安全把文件修改权限 chmod 600 /root/.ssh/authorized_keys #为了安全把文件修改权限
``` ```
第四步服务器端重启ssh服务 第四步,服务器端重启 ssh 服务
``` ```
service sshd restart #重启 sshd 服务 service sshd restart #重启 sshd 服务
``` ```