From cadd04094224b21ccef74576cedca270705c5b36 Mon Sep 17 00:00:00 2001 From: nick Date: Fri, 4 May 2018 10:01:58 +0800 Subject: [PATCH] update --- crontab.md | 4 ++-- other.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crontab.md b/crontab.md index 2267ed2..dfcc9ec 100644 --- a/crontab.md +++ b/crontab.md @@ -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` 文件存放的目录,以用户名命名 diff --git a/other.md b/other.md index 575bce1..5884581 100644 --- a/other.md +++ b/other.md @@ -10,8 +10,9 @@ scp id_rsa.pub root@ip地址:文件保存路径 cat id_rsa.pub >> /root/.ssh/authorized_keys 追加到文件中 ``` +> 如果 .shh 目录或 authorized_keys 文件不存在需要自己新建 -第三步,修改服务器端 ssh 配置文件 sshd_config +第三步,修改服务器端 ssh 配置文件 /etc/ssh/sshd_config ``` RSAAuthentication yes #开启RSA验证 @@ -20,7 +21,7 @@ PasswordAuthentication no #禁止使用密码验证登录 chmod 600 /root/.ssh/authorized_keys #为了安全把文件修改权限 ``` -第四步,服务器端重启ssh服务 +第四步,服务器端重启 ssh 服务 ``` service sshd restart #重启 sshd 服务 ```