{"id":85086,"date":"2026-07-27T00:40:35","date_gmt":"2026-07-26T16:40:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/85086.html"},"modified":"2026-07-27T00:40:35","modified_gmt":"2026-07-26T16:40:35","slug":"90-%e6%96%b0%e6%89%8b%e8%b8%a9%e5%9d%91%ef%bc%9asshd-%e5%90%af%e5%8a%a8%e5%a4%b1%e8%b4%a5%e3%80%81%e7%ab%af%e5%8f%a3%e5%8d%a0%e7%94%a8%e3%80%81%e6%97%b6%e9%97%b4%e4%b8%8d%e5%90%8c%e6%ad%a5%e5%ae%8c","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/85086.html","title":{"rendered":"90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"<h2>Linux \u65e5\u5fd7\u3001\u65f6\u95f4\u3001\u7f51\u7edc\u5168\u5957\u5b9e\u6218\u6559\u7a0b<\/h2>\n<h3>\u4e00\u3001Linux \u65e5\u5fd7\u7ba1\u7406\u8be6\u89e3&#xff08;rsyslog &#043; journald&#xff09;<\/h3>\n<h4>1.1 rsyslog \u7cfb\u7edf\u65e5\u5fd7\u670d\u52a1<\/h4>\n<p>CentOS 7 \u9ed8\u8ba4\u4f7f\u7528 rsyslog \u4f5c\u4e3a\u7cfb\u7edf\u65e5\u5fd7\u6536\u96c6\u670d\u52a1&#xff0c;\u7edd\u5927\u591a\u6570\u7cfb\u7edf\u670d\u52a1\u3001\u8ba4\u8bc1\u3001\u62a5\u9519\u90fd\u4f1a\u88ab\u7edf\u4e00\u8bb0\u5f55\u3002<\/p>\n<h5>\u6838\u5fc3\u77e5\u8bc6\u70b9<\/h5>\n<li>\u5e76\u975e\u6240\u6709\u7a0b\u5e8f\u90fd\u7531 rsyslog \u8bb0\u5f55\u65e5\u5fd7&#xff0c;\u53d6\u51b3\u4e8e\u7a0b\u5e8f\u5f00\u53d1\u8005\u8bbe\u8ba1<br \/>\nsshd&#xff1a;\u4ea4\u7531 syslog \u8bb0\u5f55\u767b\u5f55\u3001\u62a5\u9519\u65e5\u5fd7<br \/>\nhttpd\/nginx&#xff1a;\u81ea\u5e26\u72ec\u7acb\u65e5\u5fd7\u76ee\u5f55&#xff0c;\u4e0d\u4f9d\u8d56 rsyslog<\/li>\n<li>sshd \u65e5\u5fd7\u5173\u8054\u914d\u7f6e&#096;&#096;&#096;bash<br \/>\nliuyifei&#064;server ~ 22:00:10$ grep AUTHPRIV \/etc\/ssh\/sshd_config<br \/>\nliuyifei&#064;server ~ 22:00:15$ grep ^authpri \/etc\/rsyslog.conf<\/li>\n<p>\u9ed8\u8ba4\u8ba4\u8bc1\u65e5\u5fd7\u8def\u5f84&#xff1a;&#096;\/var\/log\/secure&#096;<\/p>\n<p>### 1.2 \u7ecf\u5178\u6545\u969c\u5b9e\u6218&#xff08;SSHD \u670d\u52a1\u6392\u9519&#xff09;<br \/>\n#### \u6545\u969c 1&#xff1a;sshd_config \u914d\u7f6e\u6587\u4ef6\u4e22\u5931<br \/>\n##### \u6545\u969c\u6a21\u62df<br \/>\n&#096;&#096;&#096;bash<br \/>\nliuyifei&#064;server ~ 22:05:20 $ mv \/etc\/ssh\/sshd_config .<br \/>\nliuyifei&#064;server ~ 22:05:28 $ systemctl restart sshd<\/p>\n<h6>\u65e5\u5fd7\u6392\u67e5&#xff08;\u5b9e\u65f6\u76d1\u63a7&#xff09;<\/h6>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:06:10 $ <span class=\"token function\">tail<\/span> <span class=\"token parameter variable\">-f<\/span> \/var\/log\/messages<br \/>\n<span class=\"token comment\"># \u62a5\u9519\u5173\u952e\u4fe1\u606f<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">22<\/span>:05:41 server sshd: \/etc\/ssh\/sshd_config: No such <span class=\"token function\">file<\/span> or directory<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">22<\/span>:05:41 server systemd: Failed to start OpenSSH server daemon.<\/p>\n<h6>\u4fee\u590d\u65b9\u6848<\/h6>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:07:02$ <span class=\"token function\">mv<\/span> sshd_config \/etc\/ssh\/<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:07:10$ systemctl restart sshd<\/p>\n<h5>\u6545\u969c 2&#xff1a;sshd_config \u914d\u7f6e\u53c2\u6570\u975e\u6cd5<\/h5>\n<h6>\u6545\u969c\u6a21\u62df<\/h6>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:10:01$ <span class=\"token builtin class-name\">echo<\/span> hello world <span class=\"token operator\">&gt;&gt;<\/span> \/etc\/ssh\/sshd_config<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:10:10$ systemctl restart sshd<\/p>\n<h6>\u65e5\u5fd7\u6392\u67e5<\/h6>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:10:20 $ <span class=\"token function\">tail<\/span> <span class=\"token parameter variable\">-f<\/span> \/var\/log\/messages<br \/>\n<span class=\"token comment\"># \u62a5\u9519\u5173\u952e\u4fe1\u606f<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">22<\/span>:10:21 server sshd: \/etc\/ssh\/sshd_config: line <span class=\"token number\">144<\/span>: Bad configuration option: hello<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">22<\/span>:10:21 server systemd: Failed to start OpenSSH server daemon.<\/p>\n<h6>\u4fee\u590d\u65b9\u6848<\/h6>\n<p>\u5220\u9664\u975e\u6cd5\u914d\u7f6e&#xff0c;\u91cd\u542f\u670d\u52a1\u3002<\/p>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:11:05$ <span class=\"token function\">sed<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token string\">&#039;\/hello\/d&#039;<\/span> \/etc\/ssh\/sshd_config<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:11:12$ systemctl restart sshd<\/p>\n<h5>\u6545\u969c3&#xff1a;\u670d\u52a1\u7aef\u53e3\u5360\u7528&#xff08;sshd 22 \u7aef\u53e3\u88ab\u5360&#xff09;<\/h5>\n<h6>\u6545\u969c\u73b0\u8c61<\/h6>\n<p>systemd \u7ba1\u7406\u7684 sshd \u91cd\u542f\u5931\u8d25&#xff0c;\u4f46\u5ba2\u6237\u7aef\u4f9d\u65e7\u53ef\u4ee5\u8fdc\u7a0b\u8fde\u63a5\u3002##### \u6392\u67e5\u65e5\u5fd7<\/p>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:15:25 $ journalctl <span class=\"token parameter variable\">-u<\/span> sshd<br \/>\n<span class=\"token comment\"># \u5173\u952e\u62a5\u9519<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">22<\/span>:15:58 server sshd<span class=\"token punctuation\">[<\/span><span class=\"token number\">6809<\/span><span class=\"token punctuation\">]<\/span>: error: Bind to port <span class=\"token number\">22<\/span> on <span class=\"token number\">0.0<\/span>.0.0 failed: Address already <span class=\"token keyword\">in<\/span> use.<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">22<\/span>:15:58 server sshd<span class=\"token punctuation\">[<\/span><span class=\"token number\">6809<\/span><span class=\"token punctuation\">]<\/span>: fatal: Cannot <span class=\"token builtin class-name\">bind<\/span> any address.<\/p>\n<h6>\u6839\u56e0<\/h6>\n<p>\u624b\u52a8\u6267\u884c \/sbin\/sshd \u542f\u52a8\u8fdb\u7a0b&#xff0c;\u8131\u79bb systemd \u7ba1\u7406&#xff0c;\u5360\u7528 22 \u7aef\u53e3\u3002##### \u4fee\u590d\u65b9\u6848<\/p>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:16:30 $ <span class=\"token function\">pkill<\/span> <span class=\"token parameter variable\">-9<\/span> sshd<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:16:42 $ systemctl restart sshd<\/p>\n<h4>1.3 systemd-journald \u4e8c\u8fdb\u5236\u65e5\u5fd7<\/h4>\n<p>journald \u662f systemd \u81ea\u5e26\u65e5\u5fd7\u670d\u52a1&#xff0c;\u4e8c\u8fdb\u5236\u5b58\u50a8&#xff0c;\u5b89\u5168\u6027\u66f4\u9ad8&#xff0c;\u652f\u6301\u6309\u670d\u52a1\u3001\u65f6\u95f4\u3001\u7ea7\u522b\u7cbe\u51c6\u8fc7\u6ee4\u3002<\/p>\n<h5>\u914d\u7f6e\u6587\u4ef6<\/h5>\n<p>\u8def\u5f84&#xff1a;\/etc\/systemd\/journald.conf<br \/>\n\u6838\u5fc3\u53c2\u6570 Storage<\/p>\n<ul>\n<li>persistent&#xff1a;\u6301\u4e45\u5316\u5b58\u50a8&#xff0c;\u91cd\u542f\u4e0d\u4e22\u5931&#xff0c;\u5b58\u653e \/var\/log\/journal<\/li>\n<li>volatile&#xff1a;\u4e34\u65f6\u5b58\u50a8&#xff0c;\u4ec5\u5185\u5b58&#xff0c;\u91cd\u542f\u4e22\u5931<\/li>\n<li>auto&#xff1a;\u9ed8\u8ba4&#xff0c;\u6709\u76ee\u5f55\u5219\u6301\u4e45\u5316&#xff0c;\u5426\u5219\u4e34\u65f6\u5b58\u50a8<\/li>\n<\/ul>\n<h5>\u5f00\u542f\u6301\u4e45\u5316\u65e5\u5fd7<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:18:10 $ <span class=\"token function\">vim<\/span> \/etc\/systemd\/journald.conf<br \/>\n<span class=\"token comment\"># \u4fee\u6539<\/span><br \/>\n<span class=\"token assign-left variable\">Storage<\/span><span class=\"token operator\">&#061;<\/span>persistent<br \/>\n<span class=\"token comment\"># \u91cd\u542f\u670d\u52a1\u751f\u6548<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:18:40 $ systemctl restart systemd-journald<\/p>\n<h4>1.4 journalctl \u9ad8\u9891\u67e5\u8be2\u547d\u4ee4&#xff08;\u751f\u4ea7\u5e38\u7528&#xff09;<\/h4>\n<p><span class=\"token comment\"># \u5b9e\u65f6\u76d1\u63a7\u65e5\u5fd7<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:20:00 $ journalctl <span class=\"token parameter variable\">-f<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u672c\u6b21\u5f00\u673a\u6240\u6709\u65e5\u5fd7<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:20:10 $ journalctl <span class=\"token parameter variable\">-b<\/span> <span class=\"token number\">0<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u6700\u8fd15\u6761\u65e5\u5fd7<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:20:20 $ journalctl <span class=\"token parameter variable\">-n<\/span> <span class=\"token number\">5<\/span><\/p>\n<p><span class=\"token comment\"># \u53ea\u67e5\u770b\u9519\u8bef\u7ea7\u522b\u65e5\u5fd7<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:20:30 $ journalctl <span class=\"token parameter variable\">-p<\/span> err<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u4eca\u65e5\u6240\u6709\u65e5\u5fd7<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:20:40 $ journalctl <span class=\"token parameter variable\">&#8211;since<\/span> today<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u6307\u5b9a\u670d\u52a1\u65e5\u5fd7&#xff08;\u91cd\u70b9&#xff01;\u6392\u9519\u795e\u5668&#xff09;<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:20:50$ journalctl <span class=\"token parameter variable\">-u<\/span> sshd.service<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:21:00$ journalctl <span class=\"token parameter variable\">-u<\/span> httpd.service<\/p>\n<h4>1.5 httpd \u670d\u52a1\u914d\u7f6e\u9519\u8bef\u6392\u9519\u5b9e\u6218<\/h4>\n<h5>\u6545\u969c\u6a21\u62df&#xff08;\u7aef\u53e3\u975e\u6cd5&#xff09;<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:25:10$ yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> httpd<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:26:00$ <span class=\"token function\">sed<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token string\">&#039;s\/Listen 80\/Listen 80000\/g&#039;<\/span> \/etc\/httpd\/conf\/httpd.conf<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:26:20$ systemctl restart httpd<\/p>\n<h5>\u65e5\u5fd7\u6392\u67e5<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:26:30 $ journalctl <span class=\"token parameter variable\">-f<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">22<\/span>:26:49 server httpd<span class=\"token punctuation\">[<\/span><span class=\"token number\">2877<\/span><span class=\"token punctuation\">]<\/span>: AH00526: Syntax error on line <span class=\"token number\">42<\/span> of \/etc\/httpd\/conf\/httpd.conf: Invalid address or port<\/p>\n<h5>\u4fee\u590d<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:27:10$ <span class=\"token function\">sed<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token string\">&#039;s\/Listen 80000\/Listen 80\/g&#039;<\/span> \/etc\/httpd\/conf\/httpd.conf<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:27:20$ systemctl restart httpd<\/p>\n<hr \/>\n<h3>\u4e8c\u3001Linux \u65f6\u95f4\u7ba1\u7406&#xff08;\u65f6\u95f4\u6821\u51c6 &#043; \u65f6\u533a &#043; Chrony \u65f6\u95f4\u670d\u52a1\u5668&#xff09;<\/h3>\n<h4>2.1 \u65f6\u95f4\u76f8\u5173\u4e09\u5927\u547d\u4ee4<\/h4>\n<h5>date \u7cfb\u7edf\u65f6\u95f4<\/h5>\n<p><span class=\"token comment\"># \u67e5\u770b\u65f6\u95f4<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:30:00$ <span class=\"token function\">date<\/span><br \/>\n<span class=\"token comment\"># \u8bbe\u7f6e\u82f1\u6587\u683c\u5f0f\u65f6\u95f4&#xff08;\u5fc5\u987b\u82f1\u6587\u683c\u5f0f\u624d\u80fd\u4fee\u6539&#xff09;<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:30:10$ <span class=\"token function\">date<\/span> <span class=\"token parameter variable\">-s<\/span> <span class=\"token string\">&#039;Mon Jul 27 22:30:00 2026&#039;<\/span><\/p>\n<h5>hwclock \u786c\u4ef6\u65f6\u949f<\/h5>\n<p><span class=\"token comment\"># \u67e5\u770b\u786c\u4ef6\u65f6\u95f4<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:31:00$ hwclock <span class=\"token parameter variable\">-r<\/span><br \/>\n<span class=\"token comment\"># \u7cfb\u7edf\u65f6\u95f4\u5199\u5165\u786c\u4ef6\u65f6\u95f4<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:31:10$ hwclock <span class=\"token parameter variable\">-w<\/span><br \/>\n<span class=\"token comment\"># \u786c\u4ef6\u65f6\u95f4\u540c\u6b65\u5230\u7cfb\u7edf\u65f6\u95f4<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:31:20$ hwclock <span class=\"token parameter variable\">-s<\/span><\/p>\n<h5>timedatectl \u7edf\u4e00\u65f6\u95f4\u7ba1\u7406<\/h5>\n<p><span class=\"token comment\"># \u67e5\u770b\u5b8c\u6574\u65f6\u95f4\u4fe1\u606f<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:32:00$ timedatectl<\/p>\n<p><span class=\"token comment\"># \u5173\u95ed\u81ea\u52a8\u5bf9\u65f6&#xff0c;\u624d\u80fd\u624b\u52a8\u6539\u65f6\u95f4<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:32:10$ timedatectl set-ntp no<\/p>\n<p><span class=\"token comment\"># \u624b\u52a8\u8bbe\u7f6e\u65f6\u95f4<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:32:20$ timedatectl set-time <span class=\"token string\">&#039;2026-07-27 22:30:00&#039;<\/span><\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u65f6\u533a&#xff08;\u6807\u51c6\u5317\u4eac\u65f6\u95f4&#xff09;<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:32:30$ timedatectl set-timezone Asia\/Shanghai<\/p>\n<h4>2.2 tzselect \u4ea4\u4e92\u5f0f\u65f6\u533a\u9009\u62e9<\/h4>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:35:00 $ tzselect<br \/>\n<span class=\"token comment\"># \u4f9d\u6b21\u9009\u62e9&#xff1a;5 Asia \u2192 9 China \u2192 1 Beijing Time \u2192 yes<\/span><br \/>\n<span class=\"token comment\"># \u6700\u7ec8\u65f6\u533a&#xff1a;Asia\/Shanghai<\/span><\/p>\n<h4>2.3 chrony \u65f6\u95f4\u540c\u6b65\u670d\u52a1&#xff08;\u751f\u4ea7\u6807\u914d&#xff09;<\/h4>\n<p>CentOS 7 \u9ed8\u8ba4\u4f7f\u7528 chronyd \u66ff\u4ee3 ntpd&#xff0c;\u66f4\u5feb\u3001\u66f4\u7a33\u5b9a\u3002<\/p>\n<h5>\u5ba2\u6237\u7aef\u914d\u7f6e&#xff08;\u540c\u6b65\u516c\u7f51\u65f6\u95f4&#xff09;<\/h5>\n<p><span class=\"token comment\"># \u5b89\u88c5<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:40:00$ yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> chrony<\/p>\n<p><span class=\"token comment\"># \u4fee\u6539\u65f6\u95f4\u670d\u52a1\u5668\u4e3a\u963f\u91cc\u4e91<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:40:10$ <span class=\"token function\">vim<\/span> \/etc\/chrony.conf<br \/>\nserver ntp.aliyun.com iburst<\/p>\n<p><span class=\"token comment\"># \u542f\u52a8\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:40:20$ systemctl <span class=\"token builtin class-name\">enable<\/span> chronyd <span class=\"token parameter variable\">&#8211;now<\/span><\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u5bf9\u65f6\u72b6\u6001<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:40:30$ chronyc sources <span class=\"token parameter variable\">-v<\/span><\/p>\n<h5>\u81ea\u5efa\u5185\u7f51\u65f6\u95f4\u670d\u52a1\u5668&#xff08;\u670d\u52a1\u7aef &#043; \u5ba2\u6237\u7aef&#xff09;<\/h5>\n<h6>\u670d\u52a1\u7aef\u914d\u7f6e&#xff08;10.1.8.10&#xff09;<\/h6>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:45:00 $ <span class=\"token function\">vim<\/span> \/etc\/chrony.conf<br \/>\n<span class=\"token comment\"># \u5141\u8bb8\u5185\u7f51\u7f51\u6bb5\u540c\u6b65<\/span><br \/>\nbindaddress <span class=\"token number\">10.1<\/span>.8.10<br \/>\nallow <span class=\"token number\">10.1<\/span>.8.0\/24<\/p>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:45:20 $ systemctl restart chronyd<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:45:30 $ systemctl stop firewalld<\/p>\n<h6>\u5ba2\u6237\u7aef\u914d\u7f6e<\/h6>\n<p>liuyifei&#064;client ~ <span class=\"token number\">22<\/span>:46:00 $ <span class=\"token function\">vim<\/span> \/etc\/chrony.conf<br \/>\n<span class=\"token comment\"># \u540c\u6b65\u5185\u7f51\u65f6\u95f4\u670d\u52a1\u5668<\/span><br \/>\nserver <span class=\"token number\">10.1<\/span>.8.10 iburst<\/p>\n<p>liuyifei&#064;client ~ <span class=\"token number\">22<\/span>:46:20 $ systemctl restart chronyd<br \/>\nliuyifei&#064;client ~ <span class=\"token number\">22<\/span>:46:30 $ chronyc sources <span class=\"token parameter variable\">-v<\/span><\/p>\n<hr \/>\n<h3>\u4e09\u3001Linux \u7f51\u7edc\u7ba1\u7406\u5168\u5957&#xff08;\u67e5\u770b &#043; \u914d\u7f6e &#043; \u6392\u9519&#xff09;<\/h3>\n<h4>3.1 \u7f51\u7edc\u57fa\u7840\u67e5\u770b\u547d\u4ee4<\/h4>\n<h5>1. \u7f51\u5361\u4fe1\u606f\u67e5\u770b<\/h5>\n<p><span class=\"token comment\"># \u7b80\u6d01\u67e5\u770b\u7f51\u5361<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:50:00 $ <span class=\"token function\">ip<\/span> <span class=\"token parameter variable\">-br<\/span> <span class=\"token function\">link<\/span><\/p>\n<p><span class=\"token comment\"># \u8be6\u7ec6\u7f51\u5361\u4fe1\u606f<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:50:10 $ <span class=\"token function\">ip<\/span> <span class=\"token function\">link<\/span> show ens32<\/p>\n<h5>2. IP \u5730\u5740\u67e5\u770b<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:51:00$ <span class=\"token function\">ip<\/span> <span class=\"token parameter variable\">-br<\/span> a<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:51:10$ <span class=\"token function\">ip<\/span> addr show ens32<\/p>\n<h5>3. \u8def\u7531\u7f51\u5173\u67e5\u770b<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:52:00$ <span class=\"token function\">ip<\/span> route<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">22<\/span>:52:10$ route <span class=\"token parameter variable\">-n<\/span><\/p>\n<h5>4. DNS \u67e5\u770b<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:53:00$ <span class=\"token function\">cat<\/span> \/etc\/resolv.conf<\/p>\n<h4>3.2 \u7f51\u7edc\u8fde\u901a\u6027\u6d4b\u8bd5<\/h4>\n<h5>ping \u8fde\u901a\u6027\u6d4b\u8bd5<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:55:00$ <span class=\"token function\">ping<\/span> baidu.com <span class=\"token parameter variable\">-c<\/span> <span class=\"token number\">4<\/span> <span class=\"token parameter variable\">-w<\/span> <span class=\"token number\">2<\/span><\/p>\n<h5>mtr \u8def\u7531\u8ffd\u8e2a&#xff08;\u6392\u9519\u9996\u9009&#xff09;<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">22<\/span>:56:00$ <span class=\"token function\">mtr<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token number\">1.1<\/span>.1.1<\/p>\n<h4>3.3 ss \u7f51\u7edc\u7aef\u53e3\u67e5\u770b&#xff08;\u66ff\u4ee3 netstat&#xff09;<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770bssh\u76d1\u542c\u7aef\u53e3<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:00:00$ ss <span class=\"token parameter variable\">-l<\/span> <span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> :ssh<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u6240\u6709ipv4\u76d1\u542c\u7aef\u53e3<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:00:10$ ss <span class=\"token parameter variable\">-an4<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u7aef\u53e3\u5bf9\u5e94\u8fdb\u7a0b<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:00:20$ ss -lnp4<span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> :22<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:00:30$ ss -lnp4<span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> :80<\/p>\n<h5>\u7aef\u53e3\u51b2\u7a81\u6392\u9519\u6848\u4f8b&#xff08;nginx \u5360\u752880\u5bfc\u81f4httpd\u542f\u52a8\u5931\u8d25&#xff09;<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">23<\/span>:05:00$ yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> nginx<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:05:20$ systemctl start nginx.service<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:05:40$ yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> httpd<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:06:00$ systemctl start httpd<br \/>\n<span class=\"token comment\"># \u53d1\u73b0\u7aef\u53e3\u5360\u7528<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:06:20$ ss -lnp4<span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> :80<br \/>\n<span class=\"token comment\"># \u505c\u6b62\u5360\u7528\u7a0b\u5e8f<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:06:30$ systemctl stop nginx<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:06:40$ systemctl start httpd<\/p>\n<hr \/>\n<h3>\u56db\u3001NetworkManager \u7f51\u7edc\u914d\u7f6e&#xff08;nmtui &#043; nmcli&#xff09;<\/h3>\n<h4>4.1 nmtui \u56fe\u5f62\u4ea4\u4e92\u5f0f\u914d\u7f6e&#xff08;\u5c0f\u767d\u9996\u9009&#xff09;<\/h4>\n<p>\u7ec8\u7aef\u8f93\u5165 nmtui&#xff0c;\u53ef\u89c6\u5316\u914d\u7f6e\u7f51\u5361 DHCP\u81ea\u52a8\u83b7\u53d6 \/ \u9759\u6001IP&#xff0c;\u65e0\u9700\u8bb0\u5fc6\u547d\u4ee4\u3002<\/p>\n<p>liuyifei&#064;server ~ <span class=\"token number\">23<\/span>:10:00$ nmtui<\/p>\n<h4>4.2 nmcli \u547d\u4ee4\u884c\u7f51\u7edc\u914d\u7f6e&#xff08;\u751f\u4ea7\u5e38\u7528&#xff09;<\/h4>\n<h5>\u542f\u505c\u7f51\u7edc<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">23<\/span>:12:00$ nmcli networking off<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:12:10$ nmcli networking on<\/p>\n<h5>\u7f51\u5361\u8bbe\u5907\u7ba1\u7406<\/h5>\n<p><span class=\"token comment\"># \u67e5\u770b\u8bbe\u5907<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:13:00$ nmcli device<\/p>\n<p><span class=\"token comment\"># \u65ad\u5f00\/\u6fc0\u6d3b\u7f51\u5361<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:13:10$ nmcli device disconnect ens192<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:13:20$ nmcli device connect ens192<\/p>\n<h5>\u52a8\u6001IP\u914d\u7f6e&#xff08;DHCP&#xff09;<\/h5>\n<p><span class=\"token comment\"># \u521b\u5efa\u52a8\u6001\u8fde\u63a5<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:15:00$ nmcli connection <span class=\"token function\">add<\/span> <span class=\"token builtin class-name\">type<\/span> ethernet ifname ens192 con-name ens192-dynamic ipv4.method auto<\/p>\n<p><span class=\"token comment\"># \u6fc0\u6d3b<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:15:20$ nmcli connection up ens192-dynamic<\/p>\n<h5>\u9759\u6001IP\u914d\u7f6e<\/h5>\n<p><span class=\"token comment\"># \u521b\u5efa\u9759\u6001\u8fde\u63a5<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:16:00$ nmcli connection <span class=\"token function\">add<\/span> <span class=\"token builtin class-name\">type<\/span> ethernet ifname ens192 con-name ens192-static ipv4.method manual ipv4.addresses <span class=\"token number\">10.1<\/span>.8.10\/24<\/p>\n<p><span class=\"token comment\"># \u8ffd\u52a0\u7f51\u5173\u3001DNS<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:16:20$ nmcli connection modify ens192-static ipv4.gateway <span class=\"token number\">10.1<\/span>.8.2 ipv4.dns <span class=\"token number\">223.5<\/span>.5.5<\/p>\n<p><span class=\"token comment\"># \u6fc0\u6d3b\u751f\u6548<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:16:30$ nmcli connection up ens192-static<\/p>\n<h4>4.3 \u7f51\u7edc\u914d\u7f6e\u6587\u4ef6\u8bf4\u660e<\/h4>\n<p>\u7f51\u5361\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55&#xff1a;\/etc\/sysconfig\/network-scripts\/<\/p>\n<ul>\n<li>BOOTPROTO&#061;dhcp&#xff1a;\u81ea\u52a8\u83b7\u53d6<\/li>\n<li>BOOTPROTO&#061;none&#xff1a;\u9759\u6001IP<\/li>\n<li>ONBOOT&#061;yes&#xff1a;\u5f00\u673a\u6fc0\u6d3b\u7f51\u5361<\/li>\n<\/ul>\n<p>\u624b\u52a8\u6539\u914d\u7f6e\u6587\u4ef6\u540e\u5fc5\u987b\u91cd\u8f7d&#xff1a;<\/p>\n<p>liuyifei&#064;server ~ <span class=\"token number\">23<\/span>:20:00$ nmcli connection reload<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:20:10$ nmcli connection up ens192-static<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u4e3b\u673a\u540d\u4e0e\u57df\u540d\u89e3\u6790<\/h3>\n<h4>5.1 \u4e3b\u673a\u540d\u914d\u7f6e<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770b<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:22:00$ <span class=\"token function\">hostname<\/span><\/p>\n<p><span class=\"token comment\"># \u6c38\u4e45\u4fee\u6539&#xff08;\u5199\u5165\u914d\u7f6e\u6587\u4ef6&#xff09;<\/span><br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:22:10$ hostnamectl set-hostname server.liuyifei.cloud<\/p>\n<h4>5.2 \u672c\u5730\u57df\u540d\u89e3\u6790\u4f18\u5148\u7ea7<\/h4>\n<p>\/etc\/hosts \u4f18\u5148\u4e8e DNS<\/p>\n<h5>\u672c\u5730 hosts \u89e3\u6790\u914d\u7f6e<\/h5>\n<p>liuyifei&#064;server ~ <span class=\"token number\">23<\/span>:23:00$ <span class=\"token function\">vim<\/span> \/etc\/hosts<br \/>\n<span class=\"token number\">10.1<\/span>.8.10   server.liuyifei.cloud server<\/p>\n<h4>5.3 DNS \u6545\u969c\u6392\u9519<\/h4>\n<p>\u65e0 DNS \u65f6\u65e0\u6cd5\u89e3\u6790\u516c\u7f51\u57df\u540d&#xff0c;\u914d\u7f6e DNS \u5373\u53ef\u6062\u590d&#xff1a;<\/p>\n<p>liuyifei&#064;server ~ <span class=\"token number\">23<\/span>:25:00$ nmcli connection modify ens160 ipv4.dns <span class=\"token number\">223.5<\/span>.5.5<br \/>\nliuyifei&#064;server ~ <span class=\"token number\">23<\/span>:25:10$ nmcli connection up ens160<\/p>\n<hr \/>\n<h3>\u516d\u3001\u8865\u5145&#xff1a;Vim \u6279\u91cf\u7f16\u8f91\u9ad8\u7ea7\u7528\u6cd5<\/h3>\n<li>\u6279\u91cf\u6ce8\u91ca&#xff1a;Ctrl&#043;v \u9009\u4e2d\u591a\u884c \u2192 I \u2192 \u8f93\u5165# \u2192 ESC<\/li>\n<li>\u6279\u91cf\u53d6\u6d88\u6ce8\u91ca&#xff1a;Ctrl&#043;v \u9009\u4e2d\u6ce8\u91ca\u7b26 \u2192 x<\/li>\n<li>\u6279\u91cf\u5217\u590d\u5236\u7c98\u8d34&#xff1a;Ctrl&#043;v \u9009\u4e2d\u77e9\u5f62\u5757 \u2192 y \u590d\u5236 \u2192 p \u7c98\u8d34<\/li>\n<hr \/>\n<h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<li>\u65e5\u5fd7\u6392\u9519&#xff1a;\u7cfb\u7edf\u670d\u52a1\u62a5\u9519\u4f18\u5148\u4f7f\u7528 journalctl -u \u670d\u52a1\u540d \u7cbe\u51c6\u5b9a\u4f4d&#xff0c;\u66ff\u4ee3\u4f20\u7edf tail \u6293\u65e5\u5fd7&#xff1b;sshd\u3001httpd \u914d\u7f6e\u9519\u8bef\u3001\u6587\u4ef6\u4e22\u5931\u3001\u7aef\u53e3\u5360\u7528\u662f\u6700\u9ad8\u9891\u6545\u969c\u3002<\/li>\n<li>\u65f6\u95f4\u7ba1\u7406&#xff1a;\u751f\u4ea7\u5fc5\u987b\u5f00\u542f chrony \u65f6\u95f4\u540c\u6b65&#xff0c;\u53ef\u81ea\u5efa\u5185\u7f51\u65f6\u95f4\u670d\u52a1\u5668\u4fdd\u8bc1\u96c6\u7fa4\u65f6\u95f4\u7edf\u4e00\u3002<\/li>\n<li>\u7f51\u7edc\u7ba1\u7406&#xff1a;\u719f\u7ec3\u4f7f\u7528 nmcli \u914d\u7f6e\u9759\u6001\/DHCP \u7f51\u7edc&#xff0c;ss \u547d\u4ee4\u6392\u67e5\u7aef\u53e3\u51b2\u7a81&#xff0c;\u638c\u63e1 hosts \u4e0e DNS \u89e3\u6790\u987a\u5e8f\u3002<\/li>\n<li>\u6392\u9519\u601d\u7ef4&#xff1a;\u670d\u52a1\u542f\u52a8\u5931\u8d2590%\u539f\u56e0&#xff1a;\u914d\u7f6e\u8bed\u6cd5\u9519\u8bef\u3001\u6587\u4ef6\u7f3a\u5931\u3001\u7aef\u53e3\u5360\u7528\u3001\u6743\u9650\u4e0d\u8db3&#xff0c;\u4f18\u5148\u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7\u6392\u67e5\u95ee\u9898\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>Linux \u65e5\u5fd7\u3001\u65f6\u95f4\u3001\u7f51\u7edc\u5168\u5957\u5b9e\u6218\u6559\u7a0b<br \/>\n\u4e00\u3001Linux \u65e5\u5fd7\u7ba1\u7406\u8be6\u89e3&#xff08;rsyslog  journald&#xff09;<br \/>\n1.1 rsyslog \u7cfb\u7edf\u65e5\u5fd7\u670d\u52a1<br \/>\nCentOS 7 \u9ed8\u8ba4\u4f7f\u7528 rsyslog \u4f5c\u4e3a\u7cfb\u7edf\u65e5\u5fd7\u6536\u96c6\u670d\u52a1&#xff0c;\u7edd\u5927\u591a\u6570\u7cfb\u7edf\u670d\u52a1\u3001\u8ba4\u8bc1\u3001\u62a5\u9519\u90fd\u4f1a\u88ab\u7edf\u4e00\u8bb0\u5f55\u3002<br \/>\n\u6838\u5fc3\u77e5\u8bc6\u70b9<br \/>\n\u5e76\u975e\u6240\u6709\u7a0b\u5e8f\u90fd\u7531 rsyslog \u8bb0\u5f55\u65e5\u5fd7&#xff0c;\u53d6\u51b3\u4e8e\u7a0b\u5e8f\u5f00\u53d1\u8005\u8bbe\u8ba1<br \/>\nsshd&#xff1a;\u4ea4\u7531 syslog \u8bb0\u5f55\u767b\u5f55\u3001\u62a5\u9519\u65e5\u5fd7<br \/>\nhttpd\/nginx<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[81,97,190,44],"topic":[],"class_list":["post-85086","post","type-post","status-publish","format-standard","hentry","category-server","tag-python","tag-97","tag-190","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/85086.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Linux \u65e5\u5fd7\u3001\u65f6\u95f4\u3001\u7f51\u7edc\u5168\u5957\u5b9e\u6218\u6559\u7a0b \u4e00\u3001Linux \u65e5\u5fd7\u7ba1\u7406\u8be6\u89e3&#xff08;rsyslog journald&#xff09; 1.1 rsyslog \u7cfb\u7edf\u65e5\u5fd7\u670d\u52a1 CentOS 7 \u9ed8\u8ba4\u4f7f\u7528 rsyslog \u4f5c\u4e3a\u7cfb\u7edf\u65e5\u5fd7\u6536\u96c6\u670d\u52a1&#xff0c;\u7edd\u5927\u591a\u6570\u7cfb\u7edf\u670d\u52a1\u3001\u8ba4\u8bc1\u3001\u62a5\u9519\u90fd\u4f1a\u88ab\u7edf\u4e00\u8bb0\u5f55\u3002 \u6838\u5fc3\u77e5\u8bc6\u70b9 \u5e76\u975e\u6240\u6709\u7a0b\u5e8f\u90fd\u7531 rsyslog \u8bb0\u5f55\u65e5\u5fd7&#xff0c;\u53d6\u51b3\u4e8e\u7a0b\u5e8f\u5f00\u53d1\u8005\u8bbe\u8ba1 sshd&#xff1a;\u4ea4\u7531 syslog \u8bb0\u5f55\u767b\u5f55\u3001\u62a5\u9519\u65e5\u5fd7 httpd\/nginx\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/85086.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-26T16:40:35+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85086.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/85086.html\",\"name\":\"90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-26T16:40:35+00:00\",\"dateModified\":\"2026-07-26T16:40:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/85086.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/85086.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85086.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/85086.html","og_locale":"zh_CN","og_type":"article","og_title":"90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Linux \u65e5\u5fd7\u3001\u65f6\u95f4\u3001\u7f51\u7edc\u5168\u5957\u5b9e\u6218\u6559\u7a0b \u4e00\u3001Linux \u65e5\u5fd7\u7ba1\u7406\u8be6\u89e3&#xff08;rsyslog journald&#xff09; 1.1 rsyslog \u7cfb\u7edf\u65e5\u5fd7\u670d\u52a1 CentOS 7 \u9ed8\u8ba4\u4f7f\u7528 rsyslog \u4f5c\u4e3a\u7cfb\u7edf\u65e5\u5fd7\u6536\u96c6\u670d\u52a1&#xff0c;\u7edd\u5927\u591a\u6570\u7cfb\u7edf\u670d\u52a1\u3001\u8ba4\u8bc1\u3001\u62a5\u9519\u90fd\u4f1a\u88ab\u7edf\u4e00\u8bb0\u5f55\u3002 \u6838\u5fc3\u77e5\u8bc6\u70b9 \u5e76\u975e\u6240\u6709\u7a0b\u5e8f\u90fd\u7531 rsyslog \u8bb0\u5f55\u65e5\u5fd7&#xff0c;\u53d6\u51b3\u4e8e\u7a0b\u5e8f\u5f00\u53d1\u8005\u8bbe\u8ba1 sshd&#xff1a;\u4ea4\u7531 syslog \u8bb0\u5f55\u767b\u5f55\u3001\u62a5\u9519\u65e5\u5fd7 httpd\/nginx","og_url":"https:\/\/www.wsisp.com\/helps\/85086.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-26T16:40:35+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/85086.html","url":"https:\/\/www.wsisp.com\/helps\/85086.html","name":"90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-26T16:40:35+00:00","dateModified":"2026-07-26T16:40:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/85086.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/85086.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/85086.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"90% \u65b0\u624b\u8e29\u5751\uff1asshd \u542f\u52a8\u5931\u8d25\u3001\u7aef\u53e3\u5360\u7528\u3001\u65f6\u95f4\u4e0d\u540c\u6b65\u5b8c\u6574\u89e3\u51b3\u65b9\u6848"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=85086"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85086\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=85086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=85086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=85086"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=85086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}