{"id":80974,"date":"2026-07-24T23:48:37","date_gmt":"2026-07-24T15:48:37","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/80974.html"},"modified":"2026-07-24T23:48:37","modified_gmt":"2026-07-24T15:48:37","slug":"%e6%89%8b%e6%8a%8a%e6%89%8b%e5%b8%a6%e4%bd%a0%e5%ad%a6%e4%bc%9assh%e8%bf%9c%e7%a8%8b%e7%99%bb%e5%bd%95-linux-%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/80974.html","title":{"rendered":"\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668"},"content":{"rendered":"<p>\u6982\u8ff0&#xff1a;<\/p>\n<p><span style=\"background-color:#fff5e6\">\u8fdc\u7a0b\u767b\u5f55\u662f Linux \u8fd0\u7ef4\u3001\u670d\u52a1\u5668\u7ba1\u7406\u7684<\/span><span style=\"background-color:#fff5e6\">\u5165\u95e8\u6838\u5fc3\u6280\u80fd<\/span><span style=\"background-color:#fff5e6\">\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u6211\u4eec\u51e0\u4e4e\u4e0d\u4f1a\u7269\u7406\u63a5\u89e6\u673a\u623f\u670d\u52a1\u5668&#xff0c;\u6240\u6709\u65e5\u5e38\u8fd0\u7ef4\u3001\u6307\u4ee4\u64cd\u4f5c\u3001\u6587\u4ef6\u7ba1\u7406\u90fd\u4f9d\u8d56\u8fdc\u7a0b\u8fde\u63a5\u5b9e\u73b0\u3002\u672c\u6587\u57fa\u4e8e\u5b8c\u6574\u7406\u8bba\u3001\u52a0\u5bc6\u539f\u7406\u3001\u914d\u7f6e\u8be6\u89e3\u4e0e\u5b9e\u64cd\u6848\u4f8b&#xff0c;\u5168\u65b9\u4f4d\u8bb2\u89e3 Linux \u8fdc\u7a0b\u767b\u5f55\u4f53\u7cfb&#xff0c;\u91cd\u70b9\u62c6\u89e3\u76ee\u524d\u884c\u4e1a\u4e3b\u6d41\u7684 SSH \u534f\u8bae&#xff0c;\u4ece\u539f\u7406\u5230\u547d\u4ee4\u3001\u4ece\u57fa\u7840\u914d\u7f6e\u5230\u5b89\u5168\u4f18\u5316&#xff0c;\u65b0\u624b\u4e5f\u80fd\u5faa\u5e8f\u6e10\u8fdb\u638c\u63e1\u3002<\/span><\/p>\n<\/p>\n<p>\u76ee\u5f55<\/p>\n<p style=\"margin-left:40px\">\u4e00\u3001\u8fdc\u7a0b\u767b\u5f55\u7684\u57fa\u7840\u6982\u5ff5<\/p>\n<p style=\"margin-left:80px\">1.1 \u6838\u5fc3\u6982\u5ff5<\/p>\n<p style=\"margin-left:80px\">1.2 \u4e3b\u8981\u529f\u80fd<\/p>\n<p style=\"margin-left:80px\">1.3 \u8fdc\u7a0b\u767b\u5f55\u4e3b\u6d41\u5206\u7c7b<\/p>\n<p style=\"margin-left:120px\">&#xff08;1&#xff09;\u6587\u5b57\u63a5\u53e3\u8fdc\u7a0b\u767b\u5f55<\/p>\n<p style=\"margin-left:120px\">&#xff08;2&#xff09;\u56fe\u5f62\u63a5\u53e3\u8fdc\u7a0b\u767b\u5f55<\/p>\n<p style=\"margin-left:80px\">1.4 SSH \u534f\u8bae\u8be6\u7ec6\u4ecb\u7ecd<\/p>\n<p style=\"margin-left:40px\">\u4e8c\u3001SSH \u6838\u5fc3\u52a0\u5bc6\u6280\u672f\u7b80\u4ecb<\/p>\n<p style=\"margin-left:40px\">\u4e09\u3001SSH \u5b8c\u6574\u5de5\u4f5c\u8fc7\u7a0b<\/p>\n<p style=\"margin-left:80px\">3.1 \u7248\u672c\u534f\u5546\u9636\u6bb5<\/p>\n<p style=\"margin-left:80px\">3.2 \u5bc6\u94a5\u548c\u7b97\u6cd5\u534f\u5546\u9636\u6bb5<\/p>\n<p style=\"margin-left:80px\">3.3 \u8ba4\u8bc1\u9636\u6bb5<\/p>\n<p style=\"margin-left:40px\">\u56db\u3001SSH \u670d\u52a1\u5b89\u88c5\u4e0e\u6838\u5fc3\u914d\u7f6e\u8be6\u89e3<\/p>\n<p style=\"margin-left:80px\">4.1 \u5b89\u88c5 SSH \u670d\u52a1<\/p>\n<p style=\"margin-left:80px\">4.2 \u4e3b\u914d\u7f6e\u6587\u4ef6\u89e3\u6790<\/p>\n<p style=\"margin-left:40px\">\u4e94\u3001SSH \u7efc\u5408\u5b9e\u6218\u5b9e\u9a8c<\/p>\n<p style=\"margin-left:80px\">5.1 \u5b9e\u9a8c 1&#xff1a;\u4fee\u6539 SSH \u9ed8\u8ba4\u76d1\u542c\u7aef\u53e3<\/p>\n<p style=\"margin-left:80px\">5.2 \u5b9e\u9a8c 2&#xff1a;\u7981\u6b62 root \u8d26\u6237\u8fdc\u7a0b\u767b\u5f55<\/p>\n<p style=\"margin-left:120px\">\u5e38\u89c1\u6392\u9519&#xff08;\u7406\u89e3\u5373\u53ef&#xff0c;\u8c28\u614e\u64cd\u4f5c&#xff01;&#xff01;&#xff01;&#xff09;&#xff1a;\u4fee\u6539\u914d\u7f6e\u540e\u4ecd\u53ef\u4f7f\u7528 root \u5bc6\u7801\u767b\u5f55<\/p>\n<p style=\"margin-left:80px\">5.3 \u5b9e\u9a8c 3&#xff1a;\u914d\u7f6e\u7528\u6237\u767b\u5f55\u767d\u540d\u5355<\/p>\n<p style=\"margin-left:80px\">5.4 \u5b9e\u9a8c 4&#xff1a;\u865a\u62df\u673a\u4e4b\u95f4\u914d\u7f6e\u5bc6\u94a5\u514d\u5bc6\u767b\u5f55<\/p>\n<p style=\"margin-left:80px\">5.5 \u5b9e\u9a8c 5&#xff1a;MobaXterm \u5de5\u5177\u914d\u7f6e\u5bc6\u94a5\u767b\u5f55<\/p>\n<p style=\"margin-left:120px\">1. \u670d\u52a1\u7aef\u521b\u5efa\u5bc6\u94a5\u5b58\u50a8\u6587\u4ef6<\/p>\n<p style=\"margin-left:120px\">2. \u5728 MobaXterm \u4e2d\u751f\u6210\u5bc6\u94a5&#xff08;\u5bf9\u5e94\u4f60\u622a\u56fe\u7684\u754c\u9762&#xff09;<\/p>\n<p style=\"margin-left:120px\">3. \u628a\u516c\u94a5\u4e0a\u4f20\u5230\u670d\u52a1\u5668<\/p>\n<p style=\"margin-left:120px\">4. \u5728 MobaXterm \u4e2d\u914d\u7f6e\u5bc6\u94a5\u767b\u5f55<\/p>\n<p style=\"margin-left:40px\">\u516d\u3001\u5e38\u89c1\u6545\u969c\u6392\u67e5\u603b\u7ed3<\/p>\n<p style=\"margin-left:40px\">\u4e03\u3001\u5168\u6587\u603b\u7ed3<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u8fdc\u7a0b\u767b\u5f55\u7684\u57fa\u7840\u6982\u5ff5<\/h3>\n<h4>1.1 \u6838\u5fc3\u6982\u5ff5<\/h4>\n<p>\u8fdc\u7a0b\u8fde\u63a5\u670d\u52a1\u5668&#xff0c;\u6307\u901a\u8fc7\u6587\u5b57\u63a5\u53e3\u6216\u56fe\u5f62\u63a5\u53e3&#xff0c;\u5728\u672c\u5730\u7ec8\u7aef\u8fdc\u7a0b\u767b\u5f55 Linux \u4e3b\u673a&#xff0c;\u83b7\u53d6\u7cfb\u7edf Shell \u4ea4\u4e92\u64cd\u4f5c\u754c\u9762\u3002\u8fdc\u7a0b\u767b\u5f55\u540e\u6267\u884c\u6307\u4ee4\u3001\u64cd\u4f5c\u6587\u4ef6\u3001\u914d\u7f6e\u670d\u52a1\u7684\u4f53\u9a8c&#xff0c;\u4e0e\u76f4\u63a5\u5728\u670d\u52a1\u5668\u672c\u5730\u64cd\u4f5c\u5b8c\u5168\u4e00\u81f4&#xff0c;\u6253\u7834\u4e86\u7269\u7406\u7a7a\u95f4\u7684\u9650\u5236\u3002<\/p>\n<h4>1.2 \u4e3b\u8981\u529f\u80fd<\/h4>\n<li>\u5145\u5206\u5171\u4eab\u4e3b\u673a\u8fd0\u7b97\u80fd\u529b&#xff0c;\u5408\u7406\u5206\u914d\u786c\u4ef6\u8d44\u6e90&#xff0c;\u63d0\u5347\u670d\u52a1\u5668\u5229\u7528\u7387&#xff1b;<\/li>\n<li>\u516c\u7f51\u670d\u52a1\u5668&#xff1a;\u6839\u636e\u4e1a\u52a1\u9700\u6c42\u6709\u9650\u5ea6\u5bf9\u5916\u5f00\u653e\u8fde\u63a5\u6743\u9650&#xff0c;\u517c\u987e\u8bbf\u95ee\u6027\u4e0e\u5b89\u5168\u6027&#xff1b;<\/li>\n<li>\u5185\u7f51\u5de5\u4f5c\u7ad9&#xff1a;\u4ec5\u5bf9\u5c40\u57df\u7f51\u5185\u8bbe\u5907\u5f00\u653e\u8bbf\u95ee&#xff0c;\u7981\u6b62\u5916\u7f51\u63a5\u5165&#xff0c;\u7b51\u7262\u5185\u7f51\u5b89\u5168\u8fb9\u754c\u3002<\/li>\n<h4>1.3 \u8fdc\u7a0b\u767b\u5f55\u4e3b\u6d41\u5206\u7c7b<\/h4>\n<p>\u6309\u7167\u4ea4\u4e92\u5f62\u5f0f&#xff0c;\u8fdc\u7a0b\u767b\u5f55\u4e3b\u8981\u5206\u4e3a\u6587\u5b57\u63a5\u53e3\u548c\u56fe\u5f62\u63a5\u53e3\u4e24\u5927\u7c7b&#xff0c;\u4e24\u7c7b\u534f\u8bae\u9002\u7528\u573a\u666f\u3001\u5b89\u5168\u7ea7\u522b\u5dee\u5f02\u660e\u663e\u3002<\/p>\n<p>&#xff08;1&#xff09;\u6587\u5b57\u63a5\u53e3\u8fdc\u7a0b\u767b\u5f55<\/p>\n<p>\u6587\u5b57\u63a5\u53e3\u4f9d\u9760\u547d\u4ee4\u884c\u4ea4\u4e92&#xff0c;\u5360\u7528\u8d44\u6e90\u5c11\u3001\u4f20\u8f93\u6548\u7387\u9ad8&#xff0c;\u662f\u8fd0\u7ef4\u5de5\u4f5c\u4e2d\u4f7f\u7528\u6700\u5e7f\u6cdb\u7684\u65b9\u5f0f&#xff0c;\u53c8\u5206\u4e3a\u660e\u6587\u4f20\u8f93\u4e0e\u52a0\u5bc6\u4f20\u8f93\u4e24\u5927\u6d3e\u7cfb\u3002<\/p>\n<ul>\n<li>\u660e\u6587\u4f20\u8f93\u534f\u8bae&#xff1a;\u5178\u578b\u4ee3\u8868\u4e3a Telnet\u3001RSH\u3002\u6b64\u7c7b\u534f\u8bae\u5728\u7f51\u7edc\u4e2d\u76f4\u63a5\u4f20\u8f93\u539f\u59cb\u6570\u636e&#xff0c;\u8d26\u53f7\u3001\u5bc6\u7801\u3001\u6267\u884c\u547d\u4ee4\u5747\u4e0d\u505a\u4efb\u4f55\u52a0\u5bc6&#xff0c;\u5b89\u5168\u6f0f\u6d1e\u6781\u5927&#xff0c;\u76ee\u524d\u4f01\u4e1a\u73af\u5883\u4e2d\u5df2\u57fa\u672c\u6dd8\u6c70\u3002<\/li>\n<\/ul>\n<p>\u6211\u4eec\u53ef\u4ee5\u501f\u52a9 Wireshark \u6293\u5305\u5de5\u5177\u76f4\u89c2\u9a8c\u8bc1\u5176\u5b89\u5168\u7f3a\u9677&#xff1a;<\/p>\n<p># \u670d\u52a1\u7aef\u5b89\u88c5Telnet\u670d\u52a1<br \/>\n[root&#064;hahaha ~]# yum install telnet-server -y<br \/>\n# \u542f\u52a8Telnet\u76d1\u542c\u670d\u52a1<br \/>\n[root&#064;hahaha ~]# systemctl start telnet.socket<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154834-6a6389520db59.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154834-6a63895272b0f.png\" \/><\/p>\n<p>\u4f7f\u7528 \u8fdc\u7a0b\u8fde\u63a5\u65b0\u5efa Telnet \u4f1a\u8bdd\u5b8c\u6210\u8fde\u63a5&#xff0c;\u540c\u65f6\u5728\u672c\u5730\u7535\u8111\u5b89\u88c5 Wireshark \u6293\u5305\u8f6f\u4ef6&#xff0c;\u9009\u62e9\u865a\u62df\u673a\u7f51\u5361 VMnet8 \u5f00\u542f\u6d41\u91cf\u6355\u83b7\u3002\u5728 Telnet \u547d\u4ee4\u884c\u4e2d\u6267\u884cip a\u7b49\u6307\u4ee4&#xff0c;\u9009\u4e2d\u5bf9\u5e94\u6570\u636e\u5305\u53f3\u952e\u9009\u62e9\u8ffd\u8e2a TCP \u6d41&#xff0c;\u53ef\u4ee5\u6e05\u6670\u770b\u5230\u6240\u6709\u8d26\u53f7\u3001\u5bc6\u7801\u3001\u64cd\u4f5c\u547d\u4ee4\u5747\u4ee5\u660e\u6587\u5c55\u793a&#xff0c;\u6781\u6613\u88ab\u7a83\u53d6\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154834-6a6389527a1ca.png\" \/>\u00a0 \u00a0<img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154834-6a6389528d897.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154834-6a638952dbeb0.png\" \/><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154835-6a63895336743.png\" \/><\/p>\n<p># \u5173\u95ed\u4e0a\u8ff0telnet\u8fde\u63a5&#xff0c;\u5efa\u7acbssh\u8fde\u63a5&#xff0c;\u67e5\u770b\u662f\u5426\u4e3a\u52a0\u5bc6\u4f20\u8f93<\/p>\n<ul>\n<li>\u52a0\u5bc6\u4f20\u8f93\u534f\u8bae&#xff1a;\u4ee5SSH\u4e3a\u7edd\u5bf9\u4e3b\u6d41&#xff0c;\u73b0\u5df2\u5168\u9762\u66ff\u4ee3 Telnet \u7b49\u660e\u6587\u534f\u8bae\u3002SSH \u901a\u8fc7\u4e13\u4e1a\u52a0\u5bc6\u7b97\u6cd5\u5bf9\u4f20\u8f93\u6570\u636e\u5305\u8fdb\u884c\u5168\u91cf\u52a0\u5bc6&#xff0c;\u5373\u4fbf\u6d41\u91cf\u88ab\u6293\u53d6&#xff0c;\u653b\u51fb\u8005\u4e5f\u65e0\u6cd5\u89e3\u6790\u6709\u6548\u5185\u5bb9&#xff0c;\u5b89\u5168\u6027\u62c9\u6ee1&#xff0c;\u662f\u5f53\u524d Linux \u8fdc\u7a0b\u767b\u5f55\u7684\u6807\u51c6\u65b9\u6848\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154835-6a63895384578.png\" \/><\/p>\n<p>&#xff08;2&#xff09;\u56fe\u5f62\u63a5\u53e3\u8fdc\u7a0b\u767b\u5f55<\/p>\n<p>\u8be5\u65b9\u5f0f\u4f9d\u6258\u53ef\u89c6\u5316\u684c\u9762\u5b9e\u73b0\u8fdc\u7a0b\u64cd\u4f5c&#xff0c;\u5e38\u7528\u534f\u8bae\u5305\u542b XDMCP\u3001VNC\u3001XRDP \u7b49\u3002\u4e3b\u8981\u9002\u7528\u4e8e\u9700\u8981\u56fe\u5f62\u5316\u8f6f\u4ef6\u3001\u53ef\u89c6\u5316\u64cd\u4f5c\u7684\u573a\u666f&#xff0c;\u7f3a\u70b9\u662f\u7f51\u7edc\u5f00\u9500\u5927\u3001\u5b89\u5168\u6027\u5f31\u4e8e SSH&#xff0c;\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u9891\u7387\u8f83\u4f4e\u3002<\/p>\n<h4>1.4 SSH \u534f\u8bae\u8be6\u7ec6\u4ecb\u7ecd<\/h4>\n<p>SSH \u5168\u79f0 Secure Shell Protocol&#xff08;\u5b89\u5168\u58f3\u7a0b\u5e8f\u534f\u8bae&#xff09;&#xff0c;\u7531 IETF \u7f51\u7edc\u5de5\u4f5c\u7ec4\u5236\u5b9a&#xff0c;\u9ed8\u8ba4\u76d1\u542c TCP 22 \u7aef\u53e3\u3002\u8be5\u534f\u8bae\u4f9d\u6258\u6210\u719f\u7684\u52a0\u5bc6\u6280\u672f&#xff0c;\u4fdd\u969c\u8fdc\u7a0b\u901a\u4fe1\u5168\u7a0b\u5b89\u5168\u3002 SSH \u96c6\u6210\u4e24\u5927\u5b9e\u7528\u670d\u52a1\u80fd\u529b&#xff1a;<\/p>\n<li>\u8fdc\u7a0b\u767b\u5f55\u670d\u52a1&#xff1a;\u529f\u80fd\u5bf9\u6807 Telnet&#xff0c;\u63d0\u4f9b\u5b89\u5168\u7684 Shell \u547d\u4ee4\u884c\u4ea4\u4e92\u901a\u9053&#xff1b;<\/li>\n<li>\u6587\u4ef6\u4f20\u8f93\u670d\u52a1&#xff1a;\u5185\u7f6esftp-server\u6a21\u5757&#xff0c;\u53ef\u66ff\u4ee3\u4f20\u7edf FTP \u670d\u52a1&#xff0c;\u5b9e\u73b0\u52a0\u5bc6\u72b6\u6001\u4e0b\u7684\u6587\u4ef6\u4e0a\u4f20\u3001\u4e0b\u8f7d\u4e0e\u7ba1\u7406\u3002<\/li>\n<h3>\u4e8c\u3001SSH \u6838\u5fc3\u52a0\u5bc6\u6280\u672f\u7b80\u4ecb<\/h3>\n<p>SSH \u7684\u5b89\u5168\u901a\u4fe1\u80fd\u529b&#xff0c;\u6838\u5fc3\u4f9d\u6258\u975e\u5bf9\u79f0\u5bc6\u94a5\u7cfb\u7edf\u5b9e\u73b0&#xff0c;\u8be5\u7cfb\u7edf\u4f9d\u9760\u516c\u94a5\u548c\u79c1\u94a5\u4e00\u5bf9\u72ec\u7acb\u5bc6\u94a5&#xff0c;\u5b8c\u6210\u6570\u636e\u52a0\u5bc6\u4e0e\u89e3\u5bc6\u5168\u6d41\u7a0b&#xff0c;\u4e8c\u8005\u5206\u5de5\u660e\u786e\u3001\u4e0d\u53ef\u6df7\u7528\u3002<\/p>\n<ul>\n<li>\u516c\u94a5&#xff08;public key&#xff09;&#xff1a;\u5bf9\u5916\u516c\u5f00\u5206\u53d1&#xff0c;\u6240\u6709\u8fdc\u7a0b\u8bbe\u5907\u90fd\u53ef\u83b7\u53d6\u3002\u4e3b\u8981\u4f5c\u7528\u662f\u5bf9\u5c06\u8981\u4f20\u8f93\u7684\u660e\u6587\u6570\u636e\u8fdb\u884c\u52a0\u5bc6\u3002<\/li>\n<li>\u79c1\u94a5&#xff08;private key&#xff09;&#xff1a;\u5c5e\u4e8e\u8bbe\u5907\u4e13\u5c5e\u5bc6\u94a5&#xff0c;\u7531\u6240\u6709\u8005\u59a5\u5584\u4fdd\u7ba1&#xff0c;\u4e25\u7981\u5bf9\u5916\u6cc4\u9732\u3002\u552f\u4e00\u4f5c\u7528\u662f\u89e3\u5bc6\u4f7f\u7528\u5bf9\u5e94\u516c\u94a5\u52a0\u5bc6\u540e\u7684\u6570\u636e\u5305\u3002<\/li>\n<\/ul>\n<p>\u975e\u5bf9\u79f0\u52a0\u5bc6\u5b8c\u7f8e\u89e3\u51b3\u4e86\u7f51\u7edc\u660e\u6587\u4f20\u8f93\u7684\u5b89\u5168\u95ee\u9898&#xff0c;\u4e5f\u662f SSH \u534f\u8bae\u80fd\u591f\u5e7f\u6cdb\u666e\u53ca\u7684\u6838\u5fc3\u539f\u56e0\u3002<\/p>\n<h3>\u4e09\u3001SSH \u5b8c\u6574\u5de5\u4f5c\u8fc7\u7a0b<\/h3>\n<p>\u5ba2\u6237\u7aef\u4e0e Linux \u670d\u52a1\u7aef\u5efa\u7acb SSH \u8fde\u63a5&#xff0c;\u662f\u4e00\u5957\u6807\u51c6\u5316\u7684\u4ea4\u4e92\u6d41\u7a0b&#xff0c;\u6574\u4f53\u5206\u4e3a\u4e94\u4e2a\u6838\u5fc3\u9636\u6bb5&#xff0c;\u73af\u73af\u76f8\u6263&#xff0c;\u7f3a\u4e00\u4e0d\u53ef\u3002<\/p>\n<p>\u8868\u683c<\/p>\n<table>\n<tr>\u8fc7\u7a0b\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u7248\u672c\u53f7\u534f\u5546\u9636\u6bb5<\/td>\n<td>SSH \u5206\u4e3a SSH1\u3001SSH2 \u4e24\u5927\u534f\u8bae\u7248\u672c&#xff0c;\u901a\u4fe1\u53cc\u65b9\u81ea\u52a8\u534f\u5546&#xff0c;\u786e\u5b9a\u6700\u7ec8\u4f7f\u7528\u7684\u534f\u8bae\u7248\u672c<\/td>\n<\/tr>\n<tr>\n<td>\u5bc6\u94a5\u548c\u7b97\u6cd5\u534f\u5546\u9636\u6bb5<\/td>\n<td>SSH \u652f\u6301\u591a\u79cd\u52a0\u5bc6\u3001\u6821\u9a8c\u3001\u538b\u7f29\u7b97\u6cd5&#xff0c;\u53cc\u65b9\u6bd4\u5bf9\u81ea\u8eab\u652f\u6301\u5217\u8868&#xff0c;\u6572\u5b9a\u7edf\u4e00\u7b97\u6cd5\u7ec4\u5408<\/td>\n<\/tr>\n<tr>\n<td>\u8ba4\u8bc1\u9636\u6bb5<\/td>\n<td>\u5ba2\u6237\u7aef\u63d0\u4ea4\u8eab\u4efd\u4fe1\u606f&#xff0c;\u670d\u52a1\u7aef\u5bf9\u5ba2\u6237\u7aef\u8fdb\u884c\u8eab\u4efd\u5408\u6cd5\u6027\u6821\u9a8c<\/td>\n<\/tr>\n<tr>\n<td>\u4f1a\u8bdd\u8bf7\u6c42\u9636\u6bb5<\/td>\n<td>\u8eab\u4efd\u8ba4\u8bc1\u901a\u8fc7\u540e&#xff0c;\u5ba2\u6237\u7aef\u6b63\u5f0f\u5411\u670d\u52a1\u7aef\u53d1\u9001\u4f1a\u8bdd\u5efa\u7acb\u8bf7\u6c42<\/td>\n<\/tr>\n<tr>\n<td>\u4ea4\u4e92\u4f1a\u8bdd\u9636\u6bb5<\/td>\n<td>\u4f1a\u8bdd\u521b\u5efa\u5b8c\u6210&#xff0c;\u53cc\u65b9\u8fdb\u5165\u6b63\u5e38\u6570\u636e\u4ea4\u4e92\u72b6\u6001&#xff0c;\u53ef\u6267\u884c\u5404\u7c7b\u8fd0\u7ef4\u6307\u4ee4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>3.1 \u7248\u672c\u534f\u5546\u9636\u6bb5<\/h4>\n<p>\u670d\u52a1\u7aef\u542f\u52a8 sshd \u670d\u52a1\u540e&#xff0c;\u4f1a\u6301\u7eed\u76d1\u542c\u672c\u673a 22 \u7aef\u53e3&#xff0c;\u65f6\u523b\u7b49\u5f85\u5ba2\u6237\u7aef\u63a5\u5165\u3002 \u5ba2\u6237\u7aef\u53d1\u8d77 TCP \u8fde\u63a5\u8bf7\u6c42&#xff0c;TCP \u94fe\u8def\u6210\u529f\u5efa\u7acb\u540e&#xff0c;\u670d\u52a1\u7aef\u7387\u5148\u53d1\u9001\u7248\u672c\u6807\u8bc6\u62a5\u6587&#xff0c;\u683c\u5f0f\u56fa\u5b9a\u4e3a SSH-&lt;\u4e3b\u534f\u8bae\u7248\u672c\u53f7&gt;.&lt;\u6b21\u534f\u8bae\u7248\u672c\u53f7&gt;.&lt;\u8f6f\u4ef6\u7248\u672c\u53f7&gt;\u3002\u5ba2\u6237\u7aef\u89e3\u6790\u62a5\u6587\u5e76\u6bd4\u5bf9\u81ea\u8eab\u652f\u6301\u7684\u534f\u8bae\u7248\u672c&#xff1a;\u82e5\u5ba2\u6237\u7aef\u517c\u5bb9\u670d\u52a1\u7aef\u4f4e\u7248\u672c&#xff0c;\u5219\u6cbf\u7528\u670d\u52a1\u7aef\u7248\u672c&#xff1b;\u5426\u5219\u4f7f\u7528\u5ba2\u6237\u7aef\u81ea\u8eab\u7248\u672c&#xff0c;\u5e76\u5c06\u534f\u5546\u7ed3\u679c\u56de\u4f20\u7ed9\u670d\u52a1\u7aef\u3002<\/p>\n<p>\u670d\u52a1\u7aef\u6821\u9a8c\u7248\u672c\u517c\u5bb9\u6027&#xff0c;\u534f\u5546\u5931\u8d25\u5219\u76f4\u63a5\u65ad\u5f00 TCP \u8fde\u63a5&#xff1b;\u534f\u5546\u6210\u529f\u5219\u8fdb\u5165\u4e0b\u4e00\u9636\u6bb5\u3002\u672c\u9636\u6bb5\u6240\u6709\u62a5\u6587\u5747\u4e3a\u660e\u6587\u4f20\u8f93\u3002<\/p>\n<h4>3.2 \u5bc6\u94a5\u548c\u7b97\u6cd5\u534f\u5546\u9636\u6bb5<\/h4>\n<p>\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u7aef\u4e92\u76f8\u53d1\u9001\u7b97\u6cd5\u534f\u5546\u62a5\u6587&#xff0c;\u62a5\u6587\u4e2d\u5305\u542b\u53cc\u65b9\u652f\u6301\u7684\u516c\u94a5\u7b97\u6cd5\u3001\u6570\u636e\u52a0\u5bc6\u7b97\u6cd5\u3001\u6d88\u606f\u9a8c\u8bc1\u7801&#xff08;MAC&#xff09;\u7b97\u6cd5\u3001\u538b\u7f29\u7b97\u6cd5\u7b49\u5217\u8868\u3002\u7ecf\u8fc7\u4ea4\u53c9\u6bd4\u5bf9&#xff0c;\u786e\u5b9a\u672c\u6b21\u901a\u4fe1\u7edf\u4e00\u4f7f\u7528\u7684\u7b97\u6cd5\u3002<\/p>\n<p>\u968f\u540e\u53cc\u65b9\u57fa\u4e8e DH \u5bc6\u94a5\u4ea4\u6362\u7b97\u6cd5\u3001\u670d\u52a1\u5668\u4e3b\u673a\u5bc6\u94a5\u7b49\u53c2\u6570&#xff0c;\u5171\u540c\u751f\u6210\u4f1a\u8bdd\u5bc6\u94a5\u4e0e\u4f1a\u8bdd ID\u3002\u540e\u7eed\u6240\u6709\u4f20\u8f93\u6570\u636e&#xff0c;\u90fd\u4f1a\u901a\u8fc7\u8be5\u4f1a\u8bdd\u5bc6\u94a5\u8fdb\u884c\u52a0\u5bc6\u3001\u89e3\u5bc6&#xff0c;\u5168\u7a0b\u4fdd\u969c\u901a\u4fe1\u5b89\u5168\u3002<\/p>\n<p>\u4f1a\u8bdd\u5bc6\u94a5\u751f\u6210\u5b8c\u6574\u6d41\u7a0b&#xff1a;<\/p>\n<li>\u5ba2\u6237\u7aef\u53d1\u8d77\u8fde\u63a5\u8bf7\u6c42&#xff0c;\u670d\u52a1\u7aef\u4e3b\u52a8\u5c06\u81ea\u8eab\u516c\u94a5\u53d1\u9001\u7ed9\u5ba2\u6237\u7aef\u3002\u670d\u52a1\u5668\u516c\u94a5\u5b58\u653e\u5728\/etc\/ssh\/ssh_host*\u7cfb\u5217\u6587\u4ef6\u4e2d&#xff0c;\u9996\u6b21\u542f\u52a8 sshd \u670d\u52a1\u65f6&#xff0c;\u7cfb\u7edf\u4f1a\u81ea\u52a8\u751f\u6210\u6574\u5957\u4e3b\u673a\u516c\u94a5\u4e0e\u79c1\u94a5&#xff1b;<\/li>\n<li>\u670d\u52a1\u7aef\u751f\u6210\u552f\u4e00\u4f1a\u8bdd ID&#xff0c;\u5e76\u540c\u6b65\u53d1\u9001\u81f3\u5ba2\u6237\u7aef&#xff1b;<\/li>\n<li>\u9996\u6b21\u8fde\u63a5\u65f6&#xff0c;\u5ba2\u6237\u7aef\u4f1a\u5c06\u670d\u52a1\u7aef\u516c\u94a5\u4fdd\u5b58\u81f3\u672c\u5730\u7528\u6237\u76ee\u5f55 ~\/.ssh\/known_hosts&#xff1b;\u975e\u9996\u6b21\u8fde\u63a5\u5219\u4f1a\u6bd4\u5bf9\u672c\u5730\u8bb0\u5f55\u4e0e\u63a5\u6536\u7684\u516c\u94a5&#xff0c;\u9632\u6b62\u670d\u52a1\u5668\u4f2a\u88c5&#xff1b;<\/li>\n<li>\u5ba2\u6237\u7aef\u751f\u6210\u968f\u673a\u4f1a\u8bdd\u5bc6\u94a5&#xff0c;\u4f7f\u7528\u670d\u52a1\u7aef\u516c\u94a5\u52a0\u5bc6\u540e\u53d1\u9001&#xff1b;<\/li>\n<li>\u670d\u52a1\u7aef\u4f7f\u7528\u672c\u5730\u79c1\u94a5\u89e3\u5bc6\u6570\u636e\u5305&#xff0c;\u83b7\u53d6\u4f1a\u8bdd\u5bc6\u94a5&#xff1b;<\/li>\n<li>\u53cc\u65b9\u6301\u6709\u76f8\u540c\u4f1a\u8bdd\u5bc6\u94a5&#xff0c;\u540e\u7eed\u6240\u6709\u901a\u4fe1\u6570\u636e\u5168\u90e8\u52a0\u5bc6\u4f20\u8f93\u3002<\/li>\n<h4>3.3 \u8ba4\u8bc1\u9636\u6bb5<\/h4>\n<p>\u8eab\u4efd\u8ba4\u8bc1\u662f SSH \u8fde\u63a5\u7684\u5173\u952e\u73af\u8282&#xff0c;\u76ee\u524d\u4e3b\u6d41\u652f\u6301\u53e3\u4ee4\u8ba4\u8bc1\u548c\u5bc6\u94a5\u8ba4\u8bc1\u4e24\u79cd\u65b9\u5f0f&#xff0c;\u53ef\u6839\u636e\u5b89\u5168\u9700\u6c42\u7075\u6d3b\u9009\u62e9\u3002<\/p>\n<li>\n<p>\u57fa\u4e8e\u53e3\u4ee4\u7684\u8ba4\u8bc1&#xff08;\u5bc6\u7801\u767b\u5f55&#xff09; \u5ba2\u6237\u7aef\u5c06\u7528\u6237\u540d\u3001\u767b\u5f55\u5bc6\u7801\u901a\u8fc7\u4f1a\u8bdd\u5bc6\u94a5\u52a0\u5bc6\u540e\u53d1\u9001\u81f3\u670d\u52a1\u7aef\u3002\u670d\u52a1\u7aef\u89e3\u5bc6\u83b7\u53d6\u660e\u6587\u8d26\u53f7\u5bc6\u7801&#xff0c;\u4e0e\u672c\u5730\u7cfb\u7edf\u7528\u6237\u4fe1\u606f\u8fdb\u884c\u6bd4\u5bf9&#xff0c;\u6700\u7ec8\u8fd4\u56de\u8ba4\u8bc1\u6210\u529f\u6216\u5931\u8d25\u7ed3\u679c\u3002\u8be5\u65b9\u5f0f\u914d\u7f6e\u7b80\u5355&#xff0c;\u9002\u5408\u65e5\u5e38\u6d4b\u8bd5\u3001\u5185\u7f51\u73af\u5883\u3002<\/p>\n<\/li>\n<li>\n<p>\u57fa\u4e8e\u5bc6\u94a5\u7684\u8ba4\u8bc1&#xff08;\u514d\u5bc6\u767b\u5f55&#xff09; \u5b89\u5168\u6027\u8fdc\u9ad8\u4e8e\u5bc6\u7801\u767b\u5f55&#xff0c;\u662f\u751f\u4ea7\u73af\u5883\u9996\u9009\u65b9\u6848\u3002\u6d41\u7a0b\u5982\u4e0b&#xff1a; \u5ba2\u6237\u7aef\u63d0\u524d\u751f\u6210\u516c\u79c1\u94a5\u5bf9&#xff0c;\u5e76\u5c06\u516c\u94a5\u4e0a\u4f20\u81f3\u76ee\u6807\u7528\u6237\u5bb6\u76ee\u5f55\u4e0b\u7684 .ssh\/authorized_keys \u6587\u4ef6\u3002\u8ba4\u8bc1\u65f6&#xff0c;\u670d\u52a1\u7aef\u6bd4\u5bf9\u5ba2\u6237\u7aef\u516c\u94a5\u4e0e\u672c\u5730\u6587\u4ef6\u5185\u5bb9&#xff0c;\u5339\u914d\u4e00\u81f4\u5219\u751f\u6210\u968f\u673a\u5b57\u7b26\u4e32&#xff0c;\u5148\u540e\u901a\u8fc7\u5ba2\u6237\u7aef\u516c\u94a5\u3001\u4f1a\u8bdd\u5bc6\u94a5\u52a0\u5bc6\u540e\u56de\u4f20\u3002\u5ba2\u6237\u7aef\u89e3\u5bc6\u5b57\u7b26\u4e32\u5e76\u518d\u6b21\u52a0\u5bc6\u4f20\u56de&#xff0c;\u6570\u636e\u6821\u9a8c\u4e00\u81f4\u5219\u8ba4\u8bc1\u901a\u8fc7\u3002<\/p>\n<\/li>\n<p>\u82e5\u5355\u6b21\u8ba4\u8bc1\u5931\u8d25&#xff0c;\u5ba2\u6237\u7aef\u53ef\u6839\u636e\u670d\u52a1\u7aef\u8fd4\u56de\u7684\u8ba4\u8bc1\u65b9\u5f0f\u91cd\u65b0\u5c1d\u8bd5&#xff0c;\u8fbe\u5230\u6700\u5927\u8ba4\u8bc1\u6b21\u6570\u540e&#xff0c;\u670d\u52a1\u7aef\u81ea\u52a8\u5173\u95ed\u8fde\u63a5\u3002<\/p>\n<h3>\u56db\u3001SSH \u670d\u52a1\u5b89\u88c5\u4e0e\u6838\u5fc3\u914d\u7f6e\u8be6\u89e3<\/h3>\n<h4>4.1 \u5b89\u88c5 SSH \u670d\u52a1<\/h4>\n<p>\u4e3b\u6d41 RHEL\u3001CentOS\u3001Rocky Linux \u7b49\u7cfb\u7edf\u53ef\u901a\u8fc7 yum \u547d\u4ee4\u5b89\u88c5 SSH \u670d\u52a1&#xff0c;\u591a\u6570\u7cfb\u7edf\u9ed8\u8ba4\u9884\u88c5&#xff0c;\u53ef\u76f4\u63a5\u4f7f\u7528\u3002<\/p>\n<p>[root&#064;hahaha ~]# yum install openssh-server<\/p>\n<h4>4.2 \u4e3b\u914d\u7f6e\u6587\u4ef6\u89e3\u6790<\/h4>\n<p>SSH \u670d\u52a1\u6838\u5fc3\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u4e3a \/etc\/ssh\/sshd_config&#xff0c;\u901a\u8fc7\u4fee\u6539\u8be5\u6587\u4ef6\u53ef\u5b9e\u73b0\u7aef\u53e3\u66f4\u6539\u3001\u6743\u9650\u7ba1\u63a7\u3001\u767b\u5f55\u9650\u5236\u7b49\u5b89\u5168\u914d\u7f6e&#xff0c;\u4ee5\u4e0b\u4e3a\u9ad8\u9891\u6838\u5fc3\u53c2\u6570\u8be6\u89e3&#xff1a;<\/p>\n<p>[root&#064;hahaha ~]# vim \/etc\/ssh\/sshd_config<\/p>\n<p>#Port 22                  # SSH\u9ed8\u8ba4\u76d1\u542c\u7aef\u53e3&#xff0c;\u53d6\u6d88\u6ce8\u91ca\u53ef\u81ea\u5b9a\u4e49\u7aef\u53e3&#xff0c;\u63d0\u5347\u9632\u66b4\u529b\u7834\u89e3\u80fd\u529b<br \/>\n#AddressFamily any        # \u652f\u6301IPv4\u3001IPv6\u53cc\u534f\u8bae\u6808<br \/>\n#ListenAddress 0.0.0.0    # \u76d1\u542c\u672c\u673a\u6240\u6709IPv4\u5730\u5740<br \/>\n#ListenAddress ::          # \u76d1\u542c\u672c\u673a\u6240\u6709IPv6\u5730\u5740<\/p>\n<p>#HostKey \/etc\/ssh\/ssh_host_rsa_key     # RSA\u7b97\u6cd5\u4e3b\u673a\u79c1\u94a5<br \/>\n#HostKey \/etc\/ssh\/ssh_host_ecdsa_key   # ECDSA\u7b97\u6cd5\u4e3b\u673a\u79c1\u94a5<br \/>\n#HostKey \/etc\/ssh\/ssh_host_ed25519_key # ed25519\u7b97\u6cd5\u4e3b\u673a\u79c1\u94a5<\/p>\n<p>#SyslogFacility AUTH      # SSH\u767b\u5f55\u65e5\u5fd7\u5b58\u653e\u81f3\/var\/log\/secure<br \/>\n#LogLevel INFO            # \u65e5\u5fd7\u8bb0\u5f55\u7ea7\u522b<\/p>\n<p>#LoginGraceTime 2m        # \u767b\u5f55\u5bbd\u9650\u65f6\u95f4&#xff0c;2\u5206\u949f\u672a\u8f93\u5165\u5bc6\u7801\u81ea\u52a8\u65ad\u5f00<br \/>\nPermitRootLogin yes       # \u63a7\u5236root\u7ba1\u7406\u5458\u8fdc\u7a0b\u767b\u5f55\u6743\u9650<br \/>\n#StrictModes yes          # \u68c0\u67e5\u7528\u6237\u76ee\u5f55\u3001\u5bc6\u94a5\u6587\u4ef6\u6743\u9650<br \/>\n#MaxAuthTries 6           # \u5bc6\u7801\u6700\u5927\u5c1d\u8bd5\u6b21\u6570<br \/>\n#MaxSessions 10           # \u5355\u670d\u52a1\u5668\u6700\u5927\u5e76\u53d1SSH\u4f1a\u8bdd\u6570<\/p>\n<p>AuthorizedKeysFile .ssh\/authorized_keys  # \u5bc6\u94a5\u767b\u5f55\u65f6&#xff0c;\u516c\u94a5\u5b58\u653e\u8def\u5f84<br \/>\n#PasswordAuthentication yes              # \u662f\u5426\u5f00\u542f\u5bc6\u7801\u767b\u5f55<br \/>\n#PermitEmptyPasswords no                 # \u7981\u6b62\u7a7a\u5bc6\u7801\u7528\u6237\u767b\u5f55<\/p>\n<p>Subsystem sftp \/usr\/libexec\/openssh\/sftp-server  # \u5f00\u542fSFTP\u6587\u4ef6\u4f20\u8f93\u529f\u80fd<br \/>\nAllowUsers user1 user2  # \u81ea\u5b9a\u4e49\u7528\u6237\u767d\u540d\u5355&#xff0c;\u4ec5\u540d\u5355\u5185\u7528\u6237\u53ef\u8fdc\u7a0b\u767b\u5f55<\/p>\n<h3>\u4e94\u3001SSH \u7efc\u5408\u5b9e\u6218\u5b9e\u9a8c<\/h3>\n<p>\u672c\u8282\u7ed3\u5408\u4f01\u4e1a\u5e38\u7528\u573a\u666f&#xff0c;\u8bbe\u8ba1 5 \u7ec4\u5b9e\u64cd\u5b9e\u9a8c&#xff0c;\u8986\u76d6\u7aef\u53e3\u4fee\u6539\u3001\u8d26\u53f7\u9650\u5236\u3001\u5bc6\u94a5\u514d\u5bc6\u3001\u5ba2\u6237\u7aef\u5de5\u5177\u767b\u5f55\u7b49\u6838\u5fc3\u7528\u6cd5&#xff0c;\u6240\u6709\u547d\u4ee4\u5747\u53ef\u76f4\u63a5\u590d\u7528\u3002<\/p>\n<h4>5.1 \u5b9e\u9a8c 1&#xff1a;\u4fee\u6539 SSH \u9ed8\u8ba4\u76d1\u542c\u7aef\u53e3<\/h4>\n<p>\u9ed8\u8ba4 22 \u7aef\u53e3\u662f\u653b\u51fb\u8005\u91cd\u70b9\u626b\u63cf\u5bf9\u8c61&#xff0c;\u4fee\u6539\u81ea\u5b9a\u4e49\u7aef\u53e3\u53ef\u964d\u4f4e\u88ab\u66b4\u529b\u7834\u89e3\u7684\u98ce\u9669\u3002<\/p>\n<p><span style=\"color:#ff9900\">\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6&#xff0c;\u4fee\u6539\u7aef\u53e3\u53f7<\/span><\/p>\n<p>[root&#064;hahaha ~]# vim \/etc\/ssh\/sshd_config<br \/>\n# \u53d6\u6d88\u6ce8\u91ca&#xff0c;\u5c06\u7aef\u53e3\u6539\u4e3a2222<br \/>\nPort 2222<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154835-6a638953ccfce.png\" \/><\/p>\n<p><span style=\"color:#ffd900\">\u91cd\u542f SSH \u670d\u52a1&#xff0c;\u5b89\u88c5\u7f51\u7edc\u5de5\u5177\u5e76\u67e5\u770b\u7aef\u53e3\u72b6\u6001<\/span><\/p>\n<p>[root&#064;hahaha ~]# systemctl restart sshd<br \/>\n[root&#064;hahaha ~]# yum install net-tools -y<br \/>\n[root&#064;hahaha ~]# netstat -ntlp<br \/>\n# \u67e5\u770b\u670d\u52a1\u5668IP\u5730\u5740&#xff0c;\u7528\u4e8e\u5ba2\u6237\u7aef\u8fde\u63a5<br \/>\n[root&#064;hahaha ~]# ip a<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a6389540199c.png\" \/><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a63895420daa.png\" \/><\/p>\n<p><span style=\"color:#a2e043\">\u5ba2\u6237\u7aef\u767b\u5f55\u6d4b\u8bd5<\/span><\/p>\n<p># \u4f7f\u7528\u9ed8\u8ba422\u7aef\u53e3\u767b\u5f55&#xff0c;\u8fde\u63a5\u88ab\u62d2\u7edd<br \/>\n[root&#064;localhost ~]# ssh root&#064;192.168.22.128<br \/>\nssh: connect to host 192.168.22.128 port 22: Connection refused<\/p>\n<p># \u4f7f\u7528 -p \u53c2\u6570\u6307\u5b9a\u65b0\u7aef\u53e3\u767b\u5f55<br \/>\n[root&#064;localhost ~]# ssh -p 2222 root&#064;192.168.22.128<br \/>\n# \u9996\u6b21\u8fde\u63a5\u8f93\u5165yes\u786e\u8ba4\u4e3b\u673a\u6307\u7eb9&#xff0c;\u8f93\u5165\u5bc6\u7801\u5373\u53ef\u767b\u5f55<br \/>\n# \u9000\u51fa\u767b\u5f55<br \/>\n[root&#064;hahaha ~]# exit<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a6389543c3c3.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a63895447ca8.png\" \/><\/p>\n<p><span style=\"color:#fe2c24\">\u6e29\u99a8\u63d0\u793a&#xff1a;\u505a\u5b8c\u5b9e\u9a8c\u8bb0\u5f97\u5c06\u7aef\u53e3\u53f7\u6539\u56de22<\/span><\/p>\n<h4>5.2 \u5b9e\u9a8c 2&#xff1a;\u7981\u6b62 root \u8d26\u6237\u8fdc\u7a0b\u767b\u5f55<\/h4>\n<p>root \u4e3a\u8d85\u7ea7\u7ba1\u7406\u5458&#xff0c;\u4e3a\u907f\u514d\u9ad8\u5371\u98ce\u9669&#xff0c;\u751f\u4ea7\u73af\u5883\u901a\u5e38\u7981\u6b62 root \u76f4\u63a5\u8fdc\u7a0b\u767b\u5f55\u3002 PermitRootLogin \u53c2\u6570\u652f\u6301\u56db\u79cd\u914d\u7f6e\u89c4\u5219&#xff1a;<\/p>\n<p>\u8868\u683c<\/p>\n<table>\n<tr>\u53c2\u6570\u503c\u767b\u5f55\u6743\u9650\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>yes<\/td>\n<td>\u5141\u8bb8 root \u65e0\u9650\u5236\u8fdc\u7a0b\u767b\u5f55<\/td>\n<\/tr>\n<tr>\n<td>no<\/td>\n<td>\u5f7b\u5e95\u7981\u6b62 root \u8fdc\u7a0b\u767b\u5f55<\/td>\n<\/tr>\n<tr>\n<td>prohibit-password<\/td>\n<td>\u4ec5\u5141\u8bb8\u5bc6\u94a5\u767b\u5f55&#xff0c;\u7981\u6b62\u5bc6\u7801\u767b\u5f55<\/td>\n<\/tr>\n<tr>\n<td>forced-commands only<\/td>\n<td>\u4ec5\u5141\u8bb8\u5bc6\u94a5\u6267\u884c\u6307\u5b9a\u547d\u4ee4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#a2e043\">\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/span><\/p>\n<p>[root&#064;hahaha ~]# vim \/etc\/ssh\/sshd_config<br \/>\nPermitRootLogin no<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a638954652ec.png\" \/><\/p>\n<p><span style=\"color:#a2e043\">\u91cd\u542f\u670d\u52a1\u5e76\u6d4b\u8bd5<\/span><\/p>\n<p>[root&#064;hahaha ~]# systemctl restart sshd<br \/>\n# \u5ba2\u6237\u7aef\u5c1d\u8bd5root\u767b\u5f55&#xff0c;\u6743\u9650\u88ab\u62d2\u7edd<br \/>\n[root&#064;localhost ~]# ssh root&#064;192.168.22.128<br \/>\nroot&#064;192.168.22.128&#039;s password:<br \/>\nPermission denied, please try again.<\/p>\n<p>\u5e38\u89c1\u6392\u9519&#xff08;<span style=\"color:#fe2c24\">\u7406\u89e3\u5373\u53ef&#xff0c;\u8c28\u614e\u64cd\u4f5c&#xff01;&#xff01;&#xff01;<\/span>&#xff09;&#xff1a;\u4fee\u6539\u914d\u7f6e\u540e\u4ecd\u53ef\u4f7f\u7528 root \u5bc6\u7801\u767b\u5f55<\/p>\n<p>\u6545\u969c\u73b0\u8c61&#xff1a;\u5df2\u5c06 PermitRootLogin \u8bbe\u7f6e\u4e3a no \u5e76\u91cd\u542f sshd \u670d\u52a1&#xff0c;\u4f46\u4f9d\u65e7\u80fd\u901a\u8fc7 root \u8d26\u53f7\u5bc6\u7801\u6b63\u5e38\u767b\u5f55\u3002<\/p>\n<p>\u6545\u969c\u539f\u56e0 CentOS\/RHEL 8 \u53ca\u4ee5\u4e0a\u7248\u672c\u4e2d&#xff0c;\/etc\/ssh\/sshd_config.d\/ \u76ee\u5f55\u4e0b\u7684\u9644\u5c5e\u914d\u7f6e\u6587\u4ef6\u4f18\u5148\u7ea7\u9ad8\u4e8e\u4e3b\u914d\u7f6e\u6587\u4ef6\u3002\u7cfb\u7edf\u5b89\u88c5\u9636\u6bb5\u82e5\u52fe\u9009\u4e86\u300c\u5141\u8bb8 root \u5bc6\u7801\u767b\u5f55 SSH\u300d&#xff0c;\u4f1a\u81ea\u52a8\u5728\u8be5\u76ee\u5f55\u751f\u6210\u914d\u7f6e\u6587\u4ef6&#xff0c;\u5f3a\u5236\u8bbe\u7f6e PermitRootLogin yes&#xff0c;\u8986\u76d6\u4e3b\u914d\u7f6e\u7684\u89c4\u5219\u3002<\/p>\n<p>\u6392\u67e5\u4e0e\u89e3\u51b3\u6b65\u9aa4<\/p>\n<p><span style=\"color:#a2e043\">\u67e5\u770b\u9644\u5c5e\u914d\u7f6e\u6587\u4ef6\u5185\u5bb9<\/span><\/p>\n<p>[root&#064;hahaha ~]# cat \/etc\/ssh\/sshd_config.d\/*.conf<\/p>\n<p>\u53ef\u67e5\u770b\u5230\u6587\u4ef6\u5185\u5b58\u5728\u5982\u4e0b\u914d\u7f6e&#xff0c;\u8fd9\u662f\u5bfc\u81f4\u914d\u7f6e\u5931\u6548\u7684\u6838\u5fc3\u539f\u56e0&#xff1a;<\/p>\n<p>PermitRootLogin yes<\/p>\n<p><span style=\"color:#a2e043\">\u5220\u9664\u9ad8\u4f18\u5148\u7ea7\u9644\u5c5e\u914d\u7f6e\u6587\u4ef6<\/span><\/p>\n<p>[root&#064;hahaha ~]# rm -f \/etc\/ssh\/sshd_config.d\/*.conf<\/p>\n<p><span style=\"color:#a2e043\">\u518d\u6b21\u6821\u9a8c\u4e3b\u914d\u7f6e\u6587\u4ef6<\/span><\/p>\n<p>[root&#064;hahaha ~]# grep -n PermitRootLogin \/etc\/ssh\/sshd_config<br \/>\n# \u786e\u4fdd\u4ec5\u4fdd\u7559\u4e00\u884c\u6709\u6548\u914d\u7f6e&#xff0c;\u7ed3\u679c\u5982\u4e0b\u5373\u53ef<br \/>\n41:PermitRootLogin no<\/p>\n<p><span style=\"color:#a2e043\">\u91cd\u542f SSH \u670d\u52a1\u4f7f\u914d\u7f6e\u751f\u6548<\/span><\/p>\n<p>[root&#064;hahaha ~]# systemctl restart sshd<\/p>\n<p><span style=\"color:#a2e043\">\u5ba2\u6237\u7aef\u5f3a\u5236\u4f7f\u7528\u5bc6\u7801\u767b\u5f55\u6d4b\u8bd5<\/span><\/p>\n<p>[root&#064;localhost ~]# ssh root&#064;192.168.22.128<\/p>\n<p>\u6b63\u5e38\u4f1a\u63d0\u793a\u6743\u9650\u62d2\u7edd&#xff0c;\u4ee3\u8868\u914d\u7f6e\u751f\u6548\u3002<\/p>\n<p><span style=\"color:#fe2c24\">\u6ce8&#xff1a;\u5b9e\u9a8c\u5b8c\u6210\u540e\u5c06\u914d\u7f6e\u6539\u56de\u539f\u6837<\/span><\/p>\n<h4>5.3 \u5b9e\u9a8c 3&#xff1a;\u914d\u7f6e\u7528\u6237\u767b\u5f55\u767d\u540d\u5355<\/h4>\n<p>\u901a\u8fc7AllowUsers\u53c2\u6570\u8bbe\u7f6e\u767d\u540d\u5355&#xff0c;\u4ec5\u6307\u5b9a\u666e\u901a\u7528\u6237\u53ef\u8fdc\u7a0b\u767b\u5f55&#xff0c;\u8fdb\u4e00\u6b65\u6536\u7d27\u8bbf\u95ee\u6743\u9650\u3002<\/p>\n<p><span style=\"color:#ff9900\">\u670d\u52a1\u7aef\u65b0\u5efa\u6d4b\u8bd5\u7528\u6237\u5e76\u8bbe\u7f6e\u5bc6\u7801<\/span><\/p>\n<p>[root&#064;hahaha ~]# useradd test<br \/>\n[root&#064;hahaha ~]# passwd test<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a638954726bf.png\" \/><\/p>\n<p><span style=\"color:#ff9900\">\u6dfb\u52a0\u767d\u540d\u5355\u914d\u7f6e\u5e76\u91cd\u542f\u670d\u52a1<\/span><\/p>\n<p>[root&#064;hahaha ~]# vim \/etc\/ssh\/sshd_config<br \/>\nAllowUsers test<br \/>\n[root&#064;hahaha ~]# systemctl restart sshd<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a6389547c9ee.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a6389548f9f6.png\" \/><\/p>\n<p><span style=\"color:#ff9900\">\u5ba2\u6237\u7aef\u529f\u80fd\u9a8c\u8bc1<\/span><\/p>\n<p># \u767d\u540d\u5355\u7528\u6237\u6b63\u5e38\u767b\u5f55<br \/>\n[root&#064;localhost ~]# ssh test&#064;192.168.22.128<br \/>\n# \u8f93\u5165yes\u53ca\u5bc6\u7801&#xff0c;\u767b\u5f55\u6210\u529f&#xff0c;\u4f7f\u7528 Ctrl&#043;D \u53ef\u5feb\u901f\u9000\u51fa<\/p>\n<p># \u975e\u767d\u540d\u5355root\u7528\u6237\u767b\u5f55\u88ab\u62d2\u7edd<br \/>\n[root&#064;localhost ~]# ssh root&#064;192.168.22.128<br \/>\nroot&#064;192.168.22.128&#039;s password:<br \/>\nPermission denied, please try again<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a63895497f81.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a638954a17f6.png\" \/><\/p>\n<p><span style=\"color:#fe2c24\">\u6ce8&#xff1a;\u5b9e\u9a8c\u7ed3\u675f\u540e\u5c06\u914d\u7f6e\u6539\u56de\u539f\u6837<\/span><\/p>\n<h4>5.4 \u5b9e\u9a8c 4&#xff1a;\u865a\u62df\u673a\u4e4b\u95f4\u914d\u7f6e\u5bc6\u94a5\u514d\u5bc6\u767b\u5f55<\/h4>\n<p>ssh-keygen \u662f SSH \u5bc6\u94a5\u7ba1\u7406\u5de5\u5177&#xff0c;\u53ef\u5feb\u901f\u751f\u6210\u3001\u8f6c\u6362\u5bc6\u94a5\u5bf9&#xff0c;\u8bed\u6cd5&#xff1a;<span style=\"color:#ff9900\">ssh-keygen -t<\/span> \u5bc6\u94a5\u7c7b\u578b\u3002\u6267\u884c\u540e\u4f1a\u5728\u7528\u6237\u5bb6\u76ee\u5f55\u751f\u6210.ssh\u9690\u85cf\u76ee\u5f55&#xff0c;\u5185\u542bid_rsa&#xff08;\u79c1\u94a5&#xff09;\u3001id_rsa.pub&#xff08;\u516c\u94a5&#xff09;\u3002<\/p>\n<p><span style=\"color:#956fe7\">\u5ba2\u6237\u7aef\u751f\u6210 RSA \u5bc6\u94a5\u5bf9&#xff0c;\u5168\u7a0b\u56de\u8f66\u4f7f\u7528\u9ed8\u8ba4\u914d\u7f6e<\/span><\/p>\n<p>[root&#064;localhost ~]# ssh-keygen -t rsa<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a638954ab03b.png\" \/><\/p>\n<p><span style=\"color:#956fe7\">\u4e00\u952e\u4e0a\u4f20\u516c\u94a5\u81f3\u670d\u52a1\u7aef<\/span><\/p>\n<p>[root&#064;localhost ~]# ssh-copy-id root&#064;192.168.22.128<br \/>\n# \u8f93\u5165yes\u786e\u8ba4\u4e3b\u673a&#xff0c;\u518d\u8f93\u5165\u670d\u52a1\u7aefroot\u5bc6\u7801&#xff0c;\u516c\u94a5\u81ea\u52a8\u5199\u5165 \/root\/.ssh\/authorized_keys<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154836-6a638954d396e.png\" \/><\/p>\n<p><span style=\"color:#956fe7\">\u514d\u5bc6\u767b\u5f55\u6d4b\u8bd5<\/span><\/p>\n<p>[root&#064;localhost ~]# ssh root&#064;192.168.22.128<br \/>\n# \u65e0\u9700\u8f93\u5165\u5bc6\u7801&#xff0c;\u76f4\u63a5\u767b\u5f55\u6210\u529f<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"2026-07-24p2rrvdabsfy.png\" \/><\/p>\n<p>\u53cc\u5411\u514d\u5bc6&#xff1a;\u6309\u7167\u76f8\u540c\u6b65\u9aa4\u5728\u670d\u52a1\u7aef\u6267\u884c\u5bc6\u94a5\u751f\u6210\u3001\u516c\u94a5\u4e0a\u4f20\u64cd\u4f5c&#xff0c;\u5373\u53ef\u5b9e\u73b0\u4e24\u53f0\u4e3b\u673a\u4e92\u76f8\u514d\u5bc6\u767b\u5f55\u3002<\/p>\n<p>\u670d\u52a1\u5668<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"2026-07-24p3akt3cdfm5.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"2026-07-24ptnxbtpp0yd.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"2026-07-24weoqvfuun1t.png\" \/><\/p>\n<h4>5.5 \u5b9e\u9a8c 5&#xff1a;MobaXterm \u5de5\u5177\u914d\u7f6e\u5bc6\u94a5\u767b\u5f55<\/h4>\n<p>Windows \u7aef\u5e38\u7528 MobaXterm\u3001Xshell\u3001FinalShell \u7b49\u56fe\u5f62\u5de5\u5177\u8fde\u63a5 Linux&#xff0c;\u672c\u5b9e\u9a8c\u5b9e\u73b0 MobaXterm \u5bc6\u94a5\u514d\u5bc6\u767b\u5f55\u3002<\/p>\n<p>1. \u670d\u52a1\u7aef\u521b\u5efa\u5bc6\u94a5\u5b58\u50a8\u6587\u4ef6<\/p>\n<p>[root&#064;hahaha ~]# cd \/root<br \/>\n[root&#064;hahaha ~]# ls -a<br \/>\n[root&#064;hahaha ~]# mkdir -p .ssh<br \/>\n[root&#064;hahaha ~]# cd .ssh<br \/>\n[root&#064;hahaha .ssh]# vim authorized_keys<\/p>\n<p>2. \u5728 MobaXterm \u4e2d\u751f\u6210\u5bc6\u94a5&#xff08;\u5bf9\u5e94\u4f60\u622a\u56fe\u7684\u754c\u9762&#xff09;<\/p>\n<p>\u5728\u4f60\u6253\u5f00\u7684 MobaXterm SSH Key Generator \u7a97\u53e3\u4e2d&#xff0c;\u6309\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"2026-07-24rr2ru3qevfq.png\" \/><\/p>\n<li>\u53c2\u6570\u4fdd\u6301\u9ed8\u8ba4\u5373\u53ef&#xff1a;\n<ul>\n<li>Type of key to generate&#xff1a;\u9009\u4e2d RSA<\/li>\n<li>Number of bits in a generated key&#xff1a;\u9ed8\u8ba4 2048 \u6216\u6539\u4e3a 4096 \u90fd\u53ef\u4ee5<\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb\u53f3\u4fa7\u7684 Generate \u6309\u94ae<img decoding=\"async\" alt=\"\" src=\"2026-07-24iav2plzeujf.png\" \/><\/li>\n<li>\u6309\u63d0\u793a\u5728\u7a7a\u767d\u5904\u79fb\u52a8\u9f20\u6807\u751f\u6210\u968f\u673a\u6570&#xff0c;\u5b8c\u6210\u5bc6\u94a5\u521b\u5efa<\/li>\n<li>\u5bc6\u94a5\u751f\u6210\u540e&#xff0c;\u70b9\u51fb Save public key \u4fdd\u5b58\u516c\u94a5\u6587\u4ef6&#xff0c;\u518d\u70b9\u51fb Save private key \u4fdd\u5b58\u79c1\u94a5\u6587\u4ef6&#xff08;\u5efa\u8bae\u4fdd\u5b58\u5728\u5b89\u5168\u7684\u6587\u4ef6\u5939&#xff09;<\/li>\n<p><img decoding=\"async\" alt=\"\" src=\"2026-07-24kfrrgcix0q4.png\" \/><\/p>\n<p>3. \u628a\u516c\u94a5\u4e0a\u4f20\u5230\u670d\u52a1\u5668<\/p>\n<ul>\n<li>\u7528\u8bb0\u4e8b\u672c\u6253\u5f00\u521a\u624d\u4fdd\u5b58\u7684 .pub \u516c\u94a5\u6587\u4ef6&#xff0c;\u590d\u5236\u5168\u90e8\u5185\u5bb9<\/li>\n<li>\u7c98\u8d34\u5230\u670d\u52a1\u5668 authorized_keys \u6587\u4ef6\u4e2d\u5e76\u4fdd\u5b58\u9000\u51fa<\/li>\n<li>\u91cd\u542f SSH \u670d\u52a1\u4f7f\u914d\u7f6e\u751f\u6548&#xff1a;<\/li>\n<\/ul>\n<p>[root&#064;hahaha .ssh]# systemctl restart sshd<\/p>\n<p>4. \u5728 MobaXterm \u4e2d\u914d\u7f6e\u5bc6\u94a5\u767b\u5f55<\/p>\n<li>\u65b0\u5efa\u4f1a\u8bdd&#xff0c;\u586b\u5199\u670d\u52a1\u5668 IP&#xff1a;192.168.22.128<\/li>\n<li>\u8fdb\u5165 Advanced SSH settings \u9009\u9879\u5361&#xff0c;\u52fe\u9009 Use private key<\/li>\n<li>\u70b9\u51fb Browse&#xff0c;\u9009\u62e9\u521a\u624d\u4fdd\u5b58\u7684\u79c1\u94a5\u6587\u4ef6&#xff08;.key \u683c\u5f0f&#xff09;<\/li>\n<li>\u70b9\u51fb OK \u4fdd\u5b58\u4f1a\u8bdd&#xff0c;\u53cc\u51fb\u8fde\u63a5\u5373\u53ef\u514d\u5bc6\u767b\u5f55<img decoding=\"async\" alt=\"\" src=\"2026-07-2432qlbvihubp.png\" \/><\/li>\n<hr \/>\n<p>&#x1f4a1; \u8865\u5145\u5c0f\u63d0\u793a&#xff1a;<\/p>\n<ul>\n<li>\u751f\u6210\u5bc6\u94a5\u65f6\u5982\u679c\u8bbe\u7f6e\u4e86\u5bc6\u7801&#xff0c;\u8fde\u63a5\u65f6\u9700\u8981\u8f93\u5165\u4e00\u6b21\u5bc6\u94a5\u5bc6\u7801&#xff1b;\u4e0d\u8bbe\u7f6e\u5bc6\u7801\u5219\u76f4\u63a5\u514d\u5bc6\u3002<\/li>\n<li>\u670d\u52a1\u5668\u4e0a .ssh \u76ee\u5f55\u6743\u9650\u8981\u8bbe\u4e3a 700&#xff0c;authorized_keys \u6587\u4ef6\u6743\u9650\u8bbe\u4e3a 600&#xff0c;\u5426\u5219 SSH \u4f1a\u62d2\u7edd\u8bfb\u53d6&#xff1a; chmod 700 \/root\/.ssh<br \/>\nchmod 600 \/root\/.ssh\/authorized_keys <\/li>\n<\/ul>\n<h3>\u516d\u3001\u5e38\u89c1\u6545\u969c\u6392\u67e5\u603b\u7ed3<\/h3>\n<li>\u8fde\u63a5\u62d2\u7edd \/ \u8fde\u63a5\u8d85\u65f6&#xff1a;\u68c0\u67e5 sshd \u670d\u52a1\u8fd0\u884c\u72b6\u6001\u3001\u9632\u706b\u5899\u7aef\u53e3\u653e\u884c\u89c4\u5219\u3001\u670d\u52a1\u5668 IP \u5730\u5740&#xff08;192.168.22.128&#xff09;\u662f\u5426\u6b63\u786e&#xff1b;<\/li>\n<li>\u5bc6\u7801\u6b63\u786e\u4f46\u767b\u5f55\u88ab\u62d2\u7edd&#xff1a;\u6838\u67e5PermitRootLogin\u3001AllowUsers\u7b49\u767b\u5f55\u9650\u5236\u914d\u7f6e&#xff1b;<\/li>\n<li>\u4e3b\u673a\u5bc6\u94a5\u4e0d\u5339\u914d&#xff1a;\u670d\u52a1\u5668\u91cd\u88c5\u3001IP \u590d\u7528\u5bfc\u81f4\u672c\u5730\u6307\u7eb9\u51b2\u7a81&#xff0c;\u6267\u884c ssh-keygen -R 192.168.22.128 \u5220\u9664\u65e7\u6307\u7eb9\u5373\u53ef\u3002<\/li>\n<h3>\u4e03\u3001\u5168\u6587\u603b\u7ed3<\/h3>\n<p>SSH \u4f5c\u4e3a Linux \u8fdc\u7a0b\u767b\u5f55\u7684\u6807\u51c6\u534f\u8bae&#xff0c;\u51ed\u501f\u9ad8\u5b89\u5168\u6027\u3001\u9ad8\u517c\u5bb9\u6027\u6210\u4e3a\u8fd0\u7ef4\u5fc5\u5907\u6280\u80fd\u3002\u672c\u6587\u4ece\u8fdc\u7a0b\u767b\u5f55\u57fa\u7840\u6982\u5ff5\u3001\u975e\u5bf9\u79f0\u52a0\u5bc6\u539f\u7406\u3001SSH \u4e94\u9636\u6bb5\u901a\u4fe1\u6d41\u7a0b&#xff0c;\u5230\u670d\u52a1\u5b89\u88c5\u3001\u914d\u7f6e\u6587\u4ef6\u89e3\u8bfb\u3001\u591a\u573a\u666f\u5b9e\u6218\u5b9e\u9a8c&#xff0c;\u5b8c\u6210\u4e86\u5168\u7ef4\u5ea6\u8bb2\u89e3\u3002<\/p>\n<p>\u65e5\u5e38\u4f7f\u7528\u4e2d&#xff0c;\u63a8\u8350\u7ed3\u5408\u4fee\u6539\u9ed8\u8ba4\u7aef\u53e3\u3001\u9650\u5236 root \u767b\u5f55\u3001\u5bc6\u94a5\u514d\u5bc6\u767b\u5f55\u4e09\u5927\u4f18\u5316\u65b9\u6848&#xff0c;\u517c\u987e\u4f7f\u7528\u4fbf\u6377\u6027\u4e0e\u670d\u52a1\u5668\u5b89\u5168\u3002\u719f\u7ec3\u638c\u63e1 SSH \u76f8\u5173\u64cd\u4f5c&#xff0c;\u662f\u6df1\u5165\u5b66\u4e60 Linux \u8fd0\u7ef4\u3001\u7f51\u7edc\u670d\u52a1\u3001\u96c6\u7fa4\u67b6\u6784\u7684\u91cd\u8981\u57fa\u7840\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8ff0&#xff1a;<br \/>\n\u8fdc\u7a0b\u767b\u5f55\u662f Linux \u8fd0\u7ef4\u3001\u670d\u52a1\u5668\u7ba1\u7406\u7684\u5165\u95e8\u6838\u5fc3\u6280\u80fd\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u6211\u4eec\u51e0\u4e4e\u4e0d\u4f1a\u7269\u7406\u63a5\u89e6\u673a\u623f\u670d\u52a1\u5668&#xff0c;\u6240\u6709\u65e5\u5e38\u8fd0\u7ef4\u3001\u6307\u4ee4\u64cd\u4f5c\u3001\u6587\u4ef6\u7ba1\u7406\u90fd\u4f9d\u8d56\u8fdc\u7a0b\u8fde\u63a5\u5b9e\u73b0\u3002\u672c\u6587\u57fa\u4e8e\u5b8c\u6574\u7406\u8bba\u3001\u52a0\u5bc6\u539f\u7406\u3001\u914d\u7f6e\u8be6\u89e3\u4e0e\u5b9e\u64cd\u6848\u4f8b&#xff0c;\u5168\u65b9\u4f4d\u8bb2\u89e3 Linux \u8fdc\u7a0b\u767b\u5f55\u4f53\u7cfb&#xff0c;\u91cd\u70b9\u62c6\u89e3\u76ee\u524d\u884c\u4e1a\u4e3b\u6d41\u7684 SSH \u534f\u8bae&#xff0c;\u4ece\u539f\u7406\u5230\u547d\u4ee4\u3001\u4ece\u57fa\u7840\u914d\u7f6e\u5230\u5b89\u5168\u4f18\u5316&#xff0c;\u65b0\u624b\u4e5f\u80fd\u5faa\u5e8f\u6e10\u8fdb\u638c\u63e1\u3002 \u76ee\u5f55<br \/>\n\u4e00\u3001\u8fdc\u7a0b\u767b\u5f55\u7684\u57fa\u7840\u6982\u5ff5<\/p>\n","protected":false},"author":2,"featured_media":80954,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,77,43,44],"topic":[],"class_list":["post-80974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-ssh","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668 - \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\/80974.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6982\u8ff0&#xff1a; \u8fdc\u7a0b\u767b\u5f55\u662f Linux \u8fd0\u7ef4\u3001\u670d\u52a1\u5668\u7ba1\u7406\u7684\u5165\u95e8\u6838\u5fc3\u6280\u80fd\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u6211\u4eec\u51e0\u4e4e\u4e0d\u4f1a\u7269\u7406\u63a5\u89e6\u673a\u623f\u670d\u52a1\u5668&#xff0c;\u6240\u6709\u65e5\u5e38\u8fd0\u7ef4\u3001\u6307\u4ee4\u64cd\u4f5c\u3001\u6587\u4ef6\u7ba1\u7406\u90fd\u4f9d\u8d56\u8fdc\u7a0b\u8fde\u63a5\u5b9e\u73b0\u3002\u672c\u6587\u57fa\u4e8e\u5b8c\u6574\u7406\u8bba\u3001\u52a0\u5bc6\u539f\u7406\u3001\u914d\u7f6e\u8be6\u89e3\u4e0e\u5b9e\u64cd\u6848\u4f8b&#xff0c;\u5168\u65b9\u4f4d\u8bb2\u89e3 Linux \u8fdc\u7a0b\u767b\u5f55\u4f53\u7cfb&#xff0c;\u91cd\u70b9\u62c6\u89e3\u76ee\u524d\u884c\u4e1a\u4e3b\u6d41\u7684 SSH \u534f\u8bae&#xff0c;\u4ece\u539f\u7406\u5230\u547d\u4ee4\u3001\u4ece\u57fa\u7840\u914d\u7f6e\u5230\u5b89\u5168\u4f18\u5316&#xff0c;\u65b0\u624b\u4e5f\u80fd\u5faa\u5e8f\u6e10\u8fdb\u638c\u63e1\u3002 \u76ee\u5f55 \u4e00\u3001\u8fdc\u7a0b\u767b\u5f55\u7684\u57fa\u7840\u6982\u5ff5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/80974.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-24T15:48:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154834-6a6389520db59.png\" \/>\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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/80974.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/80974.html\",\"name\":\"\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-24T15:48:37+00:00\",\"dateModified\":\"2026-07-24T15:48:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/80974.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/80974.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/80974.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668\"}]},{\"@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":"\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668 - \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\/80974.html","og_locale":"zh_CN","og_type":"article","og_title":"\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6982\u8ff0&#xff1a; \u8fdc\u7a0b\u767b\u5f55\u662f Linux \u8fd0\u7ef4\u3001\u670d\u52a1\u5668\u7ba1\u7406\u7684\u5165\u95e8\u6838\u5fc3\u6280\u80fd\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u6211\u4eec\u51e0\u4e4e\u4e0d\u4f1a\u7269\u7406\u63a5\u89e6\u673a\u623f\u670d\u52a1\u5668&#xff0c;\u6240\u6709\u65e5\u5e38\u8fd0\u7ef4\u3001\u6307\u4ee4\u64cd\u4f5c\u3001\u6587\u4ef6\u7ba1\u7406\u90fd\u4f9d\u8d56\u8fdc\u7a0b\u8fde\u63a5\u5b9e\u73b0\u3002\u672c\u6587\u57fa\u4e8e\u5b8c\u6574\u7406\u8bba\u3001\u52a0\u5bc6\u539f\u7406\u3001\u914d\u7f6e\u8be6\u89e3\u4e0e\u5b9e\u64cd\u6848\u4f8b&#xff0c;\u5168\u65b9\u4f4d\u8bb2\u89e3 Linux \u8fdc\u7a0b\u767b\u5f55\u4f53\u7cfb&#xff0c;\u91cd\u70b9\u62c6\u89e3\u76ee\u524d\u884c\u4e1a\u4e3b\u6d41\u7684 SSH \u534f\u8bae&#xff0c;\u4ece\u539f\u7406\u5230\u547d\u4ee4\u3001\u4ece\u57fa\u7840\u914d\u7f6e\u5230\u5b89\u5168\u4f18\u5316&#xff0c;\u65b0\u624b\u4e5f\u80fd\u5faa\u5e8f\u6e10\u8fdb\u638c\u63e1\u3002 \u76ee\u5f55 \u4e00\u3001\u8fdc\u7a0b\u767b\u5f55\u7684\u57fa\u7840\u6982\u5ff5","og_url":"https:\/\/www.wsisp.com\/helps\/80974.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-24T15:48:37+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724154834-6a6389520db59.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/80974.html","url":"https:\/\/www.wsisp.com\/helps\/80974.html","name":"\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-24T15:48:37+00:00","dateModified":"2026-07-24T15:48:37+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/80974.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/80974.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/80974.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u624b\u628a\u624b\u5e26\u4f60\u5b66\u4f1aSSH\u8fdc\u7a0b\u767b\u5f55 Linux \u670d\u52a1\u5668"}]},{"@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\/80974","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=80974"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/80974\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/80954"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=80974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=80974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=80974"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=80974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}