{"id":14222,"date":"2025-04-18T21:02:30","date_gmt":"2025-04-18T13:02:30","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/14222.html"},"modified":"2025-04-18T21:02:30","modified_gmt":"2025-04-18T13:02:30","slug":"linux-%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%a2%ab%e5%85%a5%e4%be%b5%e5%90%8e%ef%bc%8c%e5%a6%82%e4%bd%95%e9%80%9a%e8%bf%87%e7%99%bb%e5%bd%95%e6%97%a5%e5%bf%97%e6%8e%92%e6%9f%a5%e5%85%a5%e4%be%b5%e6%ba%90","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/14222.html","title":{"rendered":"Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011"},"content":{"rendered":"<p>\u4e00\u65e6\u670d\u52a1\u5668\u88ab\u9ed1\u5ba2\u5165\u4fb5&#xff0c;\u7b2c\u4e00\u65f6\u95f4\u8981\u505a\u7684\u5c31\u662f\u6392\u67e5\u767b\u5f55\u5386\u53f2\u3001\u5b9a\u4f4d\u5165\u4fb5\u6765\u6e90\u3001\u5c01\u5835\u5b89\u5168\u9690\u60a3\u3002\u672c\u6587\u5c06\u7cfb\u7edf\u6027\u5730\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7 Linux \u63d0\u4f9b\u7684\u65e5\u5fd7\u5de5\u5177&#xff0c;\u5206\u6790\u5f02\u5e38\u767b\u5f55\u3001\u8ffd\u8e2a\u53ef\u7591 IP&#xff0c;\u5e76\u8fdb\u884c\u5e94\u6025\u5904\u7f6e&#xff0c;\u9002\u5408\u4e00\u7ebf\u8fd0\u7ef4\u4eba\u5458\u3001\u5f00\u53d1\u8005\u53c2\u8003\u3002<\/p>\n<\/p>\n<p>\u63a8\u8350\u96ea\u82b1\u4e91\u7684\u4e91\u670d\u52a1\u5668\u6216\u7269\u7406\u670d\u52a1\u5668\u3002\u5176\u957f\u671f\u63d0\u4f9b\u4f18\u60e0\u6d3b\u52a8&#xff0c;\u6027\u4ef7\u6bd4\u9ad8&#xff0c;\u8fd0\u884c\u7a33\u5b9a&#xff0c;\u975e\u5e38\u9002\u5408\u4e2d\u5c0f\u4f01\u4e1a\u6216\u4e2a\u4eba\u5f00\u53d1\u8005\u90e8\u7f72<\/p>\n<hr \/>\n<h3>1. \u67e5\u770b\u6700\u8fd1\u7684\u767b\u5f55\u8bb0\u5f55&#xff08;last \u547d\u4ee4&#xff09;<\/h3>\n<p>\u4f7f\u7528 last \u547d\u4ee4\u53ef\u4ee5\u5feb\u901f\u67e5\u770b\u7cfb\u7edf\u7684\u767b\u5f55\u5386\u53f2&#xff0c;\u4e86\u89e3\u6709\u54ea\u4e9b\u7528\u6237\u4f55\u65f6\u3001\u4ece\u54ea\u91cc\u767b\u5f55\u4e86\u7cfb\u7edf\u3002<\/p>\n<p>last -n 20 # \u67e5\u770b\u6700\u8fd1 20 \u6761\u767b\u5f55\u8bb0\u5f55<\/p>\n<p>last -f \/var\/log\/wtmp # \u6307\u5b9a\u767b\u5f55\u65e5\u5fd7\u6587\u4ef6&#xff08;\u9ed8\u8ba4\u4e5f\u662f wtmp&#xff09; <\/p>\n<p>\u91cd\u70b9\u89c2\u5bdf&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u7528\u6237\u540d&#xff08;\u5982&#xff1a;root\u3001admin\u3001\u964c\u751f\u8d26\u53f7\u7b49&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u767b\u5f55\u65f6\u95f4&#xff08;\u662f\u5426\u662f\u51cc\u6668\u3001\u975e\u5de5\u4f5c\u65f6\u95f4\u7b49\u5f02\u5e38\u65f6\u6bb5&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u767b\u5f55\u6765\u6e90 IP<\/p>\n<\/li>\n<li>\n<p>\u767b\u5f55\u65b9\u5f0f&#xff08;\u5982 SSH pts\/X&#xff09;<\/p>\n<\/li>\n<\/ul>\n<p>\u793a\u4f8b\u8f93\u51fa&#xff1a;<\/p>\n<p>root pts\/0 192.168.1.100 Thu Apr 11 10:15 still logged in <\/p>\n<p>hacker pts\/1 45.76.123.89 Thu Apr 11 09:55 &#8211; 10:05 (00:10) <\/p>\n<p>\u5982\u53d1\u73b0\u964c\u751f\u8d26\u53f7\u6216\u5916\u90e8 IP \u767b\u5f55\u8bb0\u5f55&#xff0c;\u6781\u6709\u53ef\u80fd\u662f\u5165\u4fb5\u75d5\u8ff9\u3002<\/p>\n<hr \/>\n<h3>2. \u67e5\u770b\u5931\u8d25\u767b\u5f55\u5c1d\u8bd5&#xff08;lastb \u547d\u4ee4&#xff09;<\/h3>\n<p>lastb \u53ef\u4ee5\u67e5\u770b\u6240\u6709\u5931\u8d25\u7684\u767b\u5f55\u5c1d\u8bd5&#xff0c;\u901a\u5e38\u66b4\u529b\u7834\u89e3\u7684\u75d5\u8ff9\u4f1a\u4f53\u73b0\u5728\u8fd9\u91cc\u3002<\/p>\n<p>lastb | head -n 20\u00a0 \u00a0# \u67e5\u770b\u6700\u8fd1 20 \u6b21\u5931\u8d25\u767b\u5f55\u5c1d\u8bd5 <\/p>\n<p>\u82e5\u67d0\u4e2a IP \u8fde\u7eed\u591a\u6b21\u5c1d\u8bd5\u5931\u8d25&#xff0c;\u53ef\u80fd\u5728\u5c1d\u8bd5\u66b4\u529b\u7834\u89e3&#xff1a;<\/p>\n<p>banned ssh:notty 103.20.45.89 Thu Apr 11 09:50 &#8211; 09:51 (00:01) <\/p>\n<hr \/>\n<h3>3. \u68c0\u67e5 SSH \u767b\u5f55\u65e5\u5fd7&#xff08;\/var\/log\/secure \u6216 \/var\/log\/auth.log&#xff09;<\/h3>\n<h4>3.1 \u67e5\u627e\u6210\u529f\u767b\u5f55\u8bb0\u5f55<\/h4>\n<p>grep &#034;Accepted&#034; \/var\/log\/secure # CentOS\/ RHEL <\/p>\n<p>grep &#034;Accepted&#034; \/var\/log\/auth.log # Ubuntu\/Debian <\/p>\n<p>\u793a\u4f8b\u8f93\u51fa&#xff1a;<\/p>\n<p>Apr 11 10:15:00 server sshd[1234]: Accepted password for root from 45.76.123.89 port 45678 ssh2 <\/p>\n<h4>3.2 \u67e5\u627e\u5931\u8d25\u767b\u5f55\u8bb0\u5f55<\/h4>\n<p>grep &#034;Failed password&#034; \/var\/log\/secure <\/p>\n<p>grep &#034;Failed password&#034; \/var\/log\/auth.log <\/p>\n<h4>3.3 \u67e5\u627e root \u7528\u6237\u8fdc\u7a0b\u767b\u5f55<\/h4>\n<p>grep &#034;session opened&#034; \/var\/log\/secure | grep &#034;root&#034; <\/p>\n<hr \/>\n<h3>4. \u67e5\u770b\u5f53\u524d\u5728\u7ebf\u7528\u6237&#xff08;who \/ w&#xff09;<\/h3>\n<p>who <\/p>\n<p>w <\/p>\n<p>\u793a\u4f8b\u8f93\u51fa\u4e2d\u5982\u53d1\u73b0\u964c\u751f\u7528\u6237\u540d&#xff08;\u5982 hacker\u3001test123&#xff09;&#xff0c;\u8bf4\u660e\u7cfb\u7edf\u5df2\u88ab\u63a7\u5236\u3002<\/p>\n<hr \/>\n<h3>5. \u68c0\u67e5 SSH \u914d\u7f6e\u662f\u5426\u88ab\u7be1\u6539<\/h3>\n<p>\u5165\u4fb5\u8005\u53ef\u80fd\u4f1a\u4fee\u6539 SSH \u914d\u7f6e&#xff0c;\u653e\u5bbd\u767b\u5f55\u6761\u4ef6\u3002<\/p>\n<p>cat \/etc\/ssh\/sshd_config | grep PermitRootLogin <\/p>\n<p>\u5efa\u8bae\u8bbe\u7f6e\u4e3a&#xff1a;<\/p>\n<p>PermitRootLogin no <\/p>\n<p>\u5e76\u4fee\u6539\u9ed8\u8ba4\u7aef\u53e3&#xff0c;\u907f\u514d\u66b4\u529b\u626b\u63cf\u3002<\/p>\n<hr \/>\n<h3>6. \u67e5\u770b\u7528\u6237\u6267\u884c\u547d\u4ee4\u5386\u53f2&#xff08;.bash_history&#xff09;<\/h3>\n<p>cat ~\/.bash_history | tail -n 50 <\/p>\n<p>\u91cd\u70b9\u67e5\u627e&#xff1a;<\/p>\n<ul>\n<li>\n<p>wget \u6216 curl \u4e0b\u8f7d\u6076\u610f\u811a\u672c<\/p>\n<\/li>\n<li>\n<p>chmod 777\u3001.\/xxx \u6267\u884c\u6743\u9650\u63d0\u5347\u547d\u4ee4<\/p>\n<\/li>\n<li>\n<p>\u6dfb\u52a0\u7528\u6237\u3001\u690d\u5165\u540e\u95e8\u7684\u811a\u672c<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h3>7. \u8ffd\u8e2a\u53ef\u7591 IP \u6765\u6e90&#xff08;whois \/ ping&#xff09;<\/h3>\n<p>whois 45.76.123.89 <\/p>\n<p>ping -c 4 45.76.123.89 <\/p>\n<p>\u8fd8\u53ef\u4ee5\u4f7f\u7528 AbuseIPDB \u68c0\u67e5\u662f\u5426\u4e3a\u6076\u610f IP&#xff1a;<\/p>\n<p>curl -s https:\/\/api.abuseipdb.com\/api\/v2\/check?ipAddress&#061;45.76.123.89 <\/p>\n<hr \/>\n<h3>8. \u5e94\u6025\u5904\u7406\u5efa\u8bae<\/h3>\n<h4>8.1 \u5c01\u7981\u53ef\u7591 IP<\/h4>\n<p>iptables -A INPUT -s 45.76.123.89 -j DROP <\/p>\n<p>firewall-cmd &#8211;add-rich-rule&#061;&#039;rule family&#061;&#034;ipv4&#034; source address&#061;&#034;45.76.123.89&#034; reject&#039; &#8211;permanent <\/p>\n<p>fail2ban-client set sshd banip 45.76.123.89 <\/p>\n<h4>8.2 \u4fee\u6539 SSH \u914d\u7f6e<\/h4>\n<p>vim \/etc\/ssh\/sshd_config<\/p>\n<p># \u63a8\u8350\u914d\u7f6e <\/p>\n<p>Port 2222 <\/p>\n<p>PermitRootLogin no <\/p>\n<p>systemctl restart sshd <\/p>\n<h4>8.3 \u5f3a\u5236\u8e22\u51fa\u53ef\u7591\u7528\u6237<\/h4>\n<p>pkill -u hacker <\/p>\n<h4>8.4 \u9501\u5b9a\u9ad8\u5371\u8d26\u6237<\/h4>\n<p>usermod -L hacker <\/p>\n<h4>8.5 \u66f4\u6539\u6240\u6709\u5bc6\u7801<\/h4>\n<p>passwd root <\/p>\n<h4>8.6 \u66f4\u65b0\u7cfb\u7edf\u4e0e\u5b89\u5168\u8865\u4e01<\/h4>\n<p>yum update -y\u00a0 # CentOS <\/p>\n<p>apt update &amp;&amp; apt upgrade -y\u00a0 # Ubuntu\/Debian <\/p>\n<hr \/>\n<h3>9. \u603b\u7ed3\u4e0e\u5efa\u8bae<\/h3>\n<p>\u5f53\u53d1\u73b0\u670d\u52a1\u5668\u88ab\u5165\u4fb5&#xff0c;\u7b2c\u4e00\u6b65\u4e0d\u662f\u91cd\u88c5\u7cfb\u7edf&#xff0c;\u800c\u662f\u6392\u67e5\u5165\u4fb5\u8def\u5f84\u548c\u6e05\u9664\u9690\u60a3\u3002 \u901a\u8fc7 last\u3001lastb\u3001grep\u3001w\u3001bash_history \u7b49\u5e38\u7528\u547d\u4ee4&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5feb\u901f\u5b9a\u4f4d\u767b\u5f55\u6765\u6e90&#xff0c;\u5206\u6790\u5165\u4fb5\u884c\u4e3a\u3002<\/p>\n<p>\u5f53\u7136&#xff0c;\u5982\u679c\u7cfb\u7edf\u5df2\u88ab\u5b8c\u5168\u63a7\u5236&#xff0c;\u5efa\u8bae\u76f4\u63a5\u5907\u4efd\u6570\u636e\u540e\u91cd\u88c5\u7cfb\u7edf&#xff0c;\u5e76\u4f7f\u7528\u5982 \u96ea\u82b1\u4e91\u8fd9\u7c7b\u7a33\u5b9a\u670d\u52a1\u5668\u5e73\u53f0\u91cd\u65b0\u90e8\u7f72&#xff0c;\u540c\u65f6\u5f3a\u5316\u5982\u4e0b\u63aa\u65bd&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u7981\u6b62 root \u8fdc\u7a0b\u767b\u5f55<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u975e\u9ed8\u8ba4 SSH \u7aef\u53e3<\/p>\n<\/li>\n<li>\n<p>\u542f\u7528 fail2ban\u3001\u9632\u706b\u5899\u7b56\u7565<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u5bc6\u94a5\u767b\u5f55\u66ff\u4ee3\u5bc6\u7801\u767b\u5f55<\/p>\n<\/li>\n<li>\n<p>\u5b9a\u671f\u5ba1\u8ba1\u767b\u5f55\u65e5\u5fd7\u548c\u8d26\u6237\u6d3b\u52a8<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h4>&#x1f4da; \u76f8\u5173\u6587\u6863\u63a8\u8350&#xff1a;<\/h4>\n<ul>\n<li>\n<p>Linux \u5b98\u65b9\u6587\u6863<\/p>\n<\/li>\n<li>\n<p>Red Hat \u5b89\u5168\u6307\u5357<\/p>\n<\/li>\n<li>\n<p>Debian Wiki &#8211; \u5b89\u5168\u90e8\u5206<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<p>\u5982\u679c\u672c\u6587\u5bf9\u4f60\u6709\u5e2e\u52a9&#xff0c;\u6b22\u8fce\u70b9\u8d5e\u3001\u6536\u85cf\u3001\u8bc4\u8bba\u4ea4\u6d41&#xff0c;\u4e5f\u53ef\u4ee5\u5206\u4eab\u7ed9\u4f60\u7684\u56e2\u961f\u6216\u540c\u4e8b\u3002<\/p>\n<p>\u5982\u9700\u66f4\u591a\u5b9e\u6218\u7ecf\u9a8c\u548c Linux \u8fd0\u7ef4\u6280\u5de7&#xff0c;\u6b22\u8fce\u5173\u6ce8\u6211&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb843\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u5f53\u53d1\u73b0\u670d\u52a1\u5668\u88ab\u5165\u4fb5\uff0c\u7b2c\u4e00\u6b65\u4e0d\u662f\u91cd\u88c5\u7cfb\u7edf\uff0c\u800c\u662f\u6392\u67e5\u5165\u4fb5\u8def\u5f84\u548c\u6e05\u9664\u9690\u60a3\u3002\u901a\u8fc7lastlastbgrepw\u7b49\u5e38\u7528\u547d\u4ee4\uff0c\u6211\u4eec\u53ef\u4ee5\u5feb\u901f\u5b9a\u4f4d\u767b\u5f55\u6765\u6e90\uff0c\u5206\u6790\u5165\u4fb5\u884c\u4e3a\u3002\u5f53\u7136\uff0c\u5982\u679c\u7cfb\u7edf\u5df2\u88ab\u5b8c\u5168\u63a7\u5236\uff0c\u5efa\u8bae\u76f4\u63a5\u5907\u4efd\u6570\u636e\u540e\u91cd\u88c5\u7cfb\u7edf\uff0c\u5e76\u4f7f\u7528\u5982\u96ea\u82b1\u4e91\u8fd9\u7c7b\u7a33\u5b9a\u670d\u52a1\u5668\u5e73\u53f0\u91cd\u65b0\u90e8\u7f72\uff0c\u540c\u65f6\u5f3a\u5316\u5982\u4e0b\u63aa\u65bd\uff1a\u7981\u6b62 root \u8fdc\u7a0b\u767b\u5f55\u4f7f\u7528\u975e\u9ed8\u8ba4 SSH \u7aef\u53e3\u542f\u7528 fail2ban\u3001\u9632\u706b\u5899\u7b56\u7565\u4f7f\u7528\u5bc6\u94a5\u767b\u5f55\u66ff\u4ee3\u5bc6\u7801\u767b\u5f55\u5b9a\u671f\u5ba1\u8ba1\u767b\u5f55\u65e5\u5fd7\u548c\u8d26\u6237\u6d3b\u52a8\u3002<\/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":[92,58,43],"topic":[],"class_list":["post-14222","post","type-post","status-publish","format-standard","hentry","category-server","tag-github","tag-linux","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011 - \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\/14222.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb843\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u5f53\u53d1\u73b0\u670d\u52a1\u5668\u88ab\u5165\u4fb5\uff0c\u7b2c\u4e00\u6b65\u4e0d\u662f\u91cd\u88c5\u7cfb\u7edf\uff0c\u800c\u662f\u6392\u67e5\u5165\u4fb5\u8def\u5f84\u548c\u6e05\u9664\u9690\u60a3\u3002\u901a\u8fc7lastlastbgrepw\u7b49\u5e38\u7528\u547d\u4ee4\uff0c\u6211\u4eec\u53ef\u4ee5\u5feb\u901f\u5b9a\u4f4d\u767b\u5f55\u6765\u6e90\uff0c\u5206\u6790\u5165\u4fb5\u884c\u4e3a\u3002\u5f53\u7136\uff0c\u5982\u679c\u7cfb\u7edf\u5df2\u88ab\u5b8c\u5168\u63a7\u5236\uff0c\u5efa\u8bae\u76f4\u63a5\u5907\u4efd\u6570\u636e\u540e\u91cd\u88c5\u7cfb\u7edf\uff0c\u5e76\u4f7f\u7528\u5982\u96ea\u82b1\u4e91\u8fd9\u7c7b\u7a33\u5b9a\u670d\u52a1\u5668\u5e73\u53f0\u91cd\u65b0\u90e8\u7f72\uff0c\u540c\u65f6\u5f3a\u5316\u5982\u4e0b\u63aa\u65bd\uff1a\u7981\u6b62 root \u8fdc\u7a0b\u767b\u5f55\u4f7f\u7528\u975e\u9ed8\u8ba4 SSH \u7aef\u53e3\u542f\u7528 fail2ban\u3001\u9632\u706b\u5899\u7b56\u7565\u4f7f\u7528\u5bc6\u94a5\u767b\u5f55\u66ff\u4ee3\u5bc6\u7801\u767b\u5f55\u5b9a\u671f\u5ba1\u8ba1\u767b\u5f55\u65e5\u5fd7\u548c\u8d26\u6237\u6d3b\u52a8\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/14222.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T13:02:30+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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/14222.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/14222.html\",\"name\":\"Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T13:02:30+00:00\",\"dateModified\":\"2025-04-18T13:02:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/14222.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/14222.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/14222.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011\"}]},{\"@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":"Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011 - \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\/14222.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb843\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u5f53\u53d1\u73b0\u670d\u52a1\u5668\u88ab\u5165\u4fb5\uff0c\u7b2c\u4e00\u6b65\u4e0d\u662f\u91cd\u88c5\u7cfb\u7edf\uff0c\u800c\u662f\u6392\u67e5\u5165\u4fb5\u8def\u5f84\u548c\u6e05\u9664\u9690\u60a3\u3002\u901a\u8fc7lastlastbgrepw\u7b49\u5e38\u7528\u547d\u4ee4\uff0c\u6211\u4eec\u53ef\u4ee5\u5feb\u901f\u5b9a\u4f4d\u767b\u5f55\u6765\u6e90\uff0c\u5206\u6790\u5165\u4fb5\u884c\u4e3a\u3002\u5f53\u7136\uff0c\u5982\u679c\u7cfb\u7edf\u5df2\u88ab\u5b8c\u5168\u63a7\u5236\uff0c\u5efa\u8bae\u76f4\u63a5\u5907\u4efd\u6570\u636e\u540e\u91cd\u88c5\u7cfb\u7edf\uff0c\u5e76\u4f7f\u7528\u5982\u96ea\u82b1\u4e91\u8fd9\u7c7b\u7a33\u5b9a\u670d\u52a1\u5668\u5e73\u53f0\u91cd\u65b0\u90e8\u7f72\uff0c\u540c\u65f6\u5f3a\u5316\u5982\u4e0b\u63aa\u65bd\uff1a\u7981\u6b62 root \u8fdc\u7a0b\u767b\u5f55\u4f7f\u7528\u975e\u9ed8\u8ba4 SSH \u7aef\u53e3\u542f\u7528 fail2ban\u3001\u9632\u706b\u5899\u7b56\u7565\u4f7f\u7528\u5bc6\u94a5\u767b\u5f55\u66ff\u4ee3\u5bc6\u7801\u767b\u5f55\u5b9a\u671f\u5ba1\u8ba1\u767b\u5f55\u65e5\u5fd7\u548c\u8d26\u6237\u6d3b\u52a8\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/14222.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T13:02:30+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/14222.html","url":"https:\/\/www.wsisp.com\/helps\/14222.html","name":"Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T13:02:30+00:00","dateModified":"2025-04-18T13:02:30+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/14222.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/14222.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/14222.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux \u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\uff0c\u5982\u4f55\u901a\u8fc7\u767b\u5f55\u65e5\u5fd7\u6392\u67e5\u5165\u4fb5\u6e90\uff1f\u3010\u5b9e\u6218\u6307\u5357\u3011"}]},{"@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\/14222","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=14222"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/14222\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=14222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=14222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=14222"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=14222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}