{"id":30999,"date":"2025-04-21T07:01:02","date_gmt":"2025-04-20T23:01:02","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/30999.html"},"modified":"2025-04-21T07:01:02","modified_gmt":"2025-04-20T23:01:02","slug":"%e5%86%85%e5%a4%96%e7%bd%91%e6%98%a0%e5%b0%84%e8%ae%bf%e9%97%ae%e5%86%85%e7%bd%91%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/30999.html","title":{"rendered":"\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668"},"content":{"rendered":"<p>autossh\u76f8\u5173\u77e5\u8bc6\u53c2\u8003\u6587\u6863&#xff1a;ssh\u7aef\u53e3\u8f6c\u53d1_allowtcpforwarding-CSDN\u535a\u5ba2<\/p>\n<p>\u5982\u679c\u672c\u5730\u6709\u516c\u7f51ip&#xff0c;\u6bd4\u5982\u8fde\u63a5\u7684\u5bbd\u5e26\u6709\u516c\u7f51ip&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u8def\u7531\u914d\u7f6e\u8f6c\u53d1\u5c31\u884c\u4e86&#xff0c;\u5982\u679c\u672c\u5730\u6ca1\u6709\u516c\u7f51ip&#xff0c;\u90a3\u5c31\u9700\u8981\u901a\u8fc7\u4e0b\u9762\u8fd9\u79cd\u65b9\u5f0f\u6765\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668\u4e86\u3002<\/p>\n<p>1&#xff1a;\u9996\u5148\u5185\u7f51\u670d\u52a1\u5668\u9700\u8981\u8fde\u63a5\u5916\u7f51&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u7f51\u7ebf\u6216\u8005WiFi\u90fd\u53ef\u4ee5\u3002<\/p>\n<p>2&#xff1a;\u51c6\u5907\u4e09\u53f0\u670d\u52a1&#xff0c;\u4e00\u53f0\u662f\u5185\u7f51\u670d\u52a1\u5668A&#xff0c;\u4e00\u53f0\u662f\u963f\u91cc\u4e91\u516c\u7f51\u670d\u52a1\u5668B(<span style=\"color:#0000ff\">47.96.79.177<\/span>)&#xff0c;\u4e00\u53f0\u662f\u5176\u4ed6\u53ef\u4ee5\u8bbf\u95ee\u5916\u7f51\u7684\u8bbe\u5907C<\/p>\n<p>3&#xff1a;\u5185\u7f51\u670d\u52a1\u5668A\u548c\u516c\u7f51\u670d\u52a1\u5668B\u4e92\u76f8\u540c\u6b65\u5bc6\u5319&#xff0c;\u51c6\u5907\u5185\u7f51\u670d\u52a1\u5668A\u5bc6\u5319<\/p>\n<p>#\u8fdb\u5165\u5185\u7f51\u670d\u52a1\u5668A&#xff0c;\u6267\u884c\u4e0b\u9762\u547d\u4ee4<br \/>\ncd ~\/.ssh \u6216\u8005 cd \/.ssh  <\/p>\n<p>#\u5982\u679c\u63d0\u793a\u6ca1\u7528\u8be5\u76ee\u5f55&#xff0c;\u5219\u9700\u8981\u751f\u6210\u8be5\u76ee\u5f55\u548c\u4e0b\u9762\u7684\u6587\u4ef6&#xff0c;\u76f4\u63a5\u5728\u5185\u7f51\u670d\u52a1\u5668A\u901a\u8fc7\u6267\u884c\u4e0b\u9762\u8fd9\u4e2a\u547d\u4ee4\u5c31\u53ef\u4ee5\u4e86<br \/>\nssh-keygen -t rsa &#xff08;\u4e00\u76f4\u56de\u8f66,\u65e0\u9700\u914d\u7f6e\u5bc6\u7801&#xff09;<\/p>\n<p>#\u6267\u884c\u5b8c\u6210\u540e&#xff0c;\u518d\u6b21cd ~\/.ssh&#xff0c;\u53ef\u4ee5\u53d1\u73b0\u5728\u8be5\u6587\u4ef6\u4e0b\u9762\u4f1a\u51fa\u73b0id_rsa \u548cid_rsa.pub\u6587\u4ef6 <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"856\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230100-68057cac241a7.png\" width=\"1182\" \/><\/p>\n<p>4&#xff1a;\u5f00\u59cb\u540c\u6b65\u5bc6\u5319&#xff0c;\u914d\u7f6eA ssh\u5230 B\u7684\u514d\u5bc6\u767b\u9646<\/p>\n<p>#\u5728\u5185\u7f51\u670d\u52a1\u5668A\u6267\u884c\u540c\u6b65\u5bc6\u5319\u547d\u4ee4&#xff0c;\u8be5\u547d\u4ee4\u4f1a\u8981\u6c42\u8f93\u5165\u5916\u7f51\u670d\u52a1\u5bc6\u7801&#xff0c;\u76f4\u63a5\u8f93\u5165\u5c31\u884c<br \/>\n#ssh-copy-id -i ~\/.ssh\/id_rsa.pub -p A\u7684\u67d0\u8fdc\u7a0b\u7aef\u53e3 A\u7684\u7528\u6237\u540d&#064;A\u7684IP<br \/>\n#or<br \/>\n#ssh-copy-id -i .ssh\/id_rsa.pub A\u7684\u7528\u6237\u540d&#064;A\u7684IP<br \/>\n#or<br \/>\n#ssh-copy-id  A\u7684\u7528\u6237\u540d&#064;A\u7684IP<br \/>\n#or<br \/>\n#\u4e0b\u9762\u8fd9\u4e00\u6b65\u662f\u590d\u5236A\u7684~\/.ssh\/id_rsa.pub\u5185\u5bb9\u5230B\u7684~\/.ssh\/authorized_keys\u4e2d<\/p>\n<p>ssh-copy-id -i ~\/.ssh\/id_rsa.pub -p 22 root&#064;47.96.79.177<\/p>\n<p>\u6267\u884c\u5b8c\u6210\u540e&#xff0c;\u4f1a\u5728\u5185\u7f51\u670d\u52a1\u5668A ~\/.ssh\/\u76ee\u5f55\u4e0b\u51fa\u73b0known_hosts\u6587\u4ef6&#xff0c;\u91cc\u9762\u662f\u5916\u7f51\u670d\u52a1\u5668\u7684\u4fe1\u606f <\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u540c\u65f6\u6b64\u65f6\u767b\u5f55\u5230\u963f\u91cc\u4e91\u516c\u7f51\u670d\u52a1\u5668B&#xff0c;\u4e5f\u4f1a\u5728B\u670d\u52a1\u5668~\/.ssh\u76ee\u5f55\u4e0b\u770b\u5230authorized_keys\u6587\u4ef6&#xff0c;\u91cc\u9762\u662f\u5185\u7f51\u670d\u52a1\u5668\u4fe1\u606f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"104\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230100-68057cac97a0b.png\" width=\"769\" \/><\/p>\n<p>5&#xff1a;<span style=\"background-color:#ffffff\"><span style=\"color:#4d4d4d\">\u914d\u7f6e<\/span><\/span>\u963f\u91cc\u4e91\u516c\u7f51\u670d\u52a1\u5668B<span style=\"background-color:#ffffff\"><span style=\"color:#4d4d4d\">\u7684ssh\u53c2\u6570(\u5c24\u5176\u662fAllowTcpForwarding yes \u548c GatewayPorts yes<\/span><\/span><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><span style=\"background-color:#ffffff\"><span style=\"color:#4d4d4d\">\u8fd92\u4e2a\u8981\u5f00\u542f&#xff0c;\u5176\u4ed6\u53c2\u6570\u53ef\u9009\u914d\u7f6e)<\/span><\/span><\/p>\n<p>vim \/etc\/ssh\/sshd_config<\/p>\n<p>#\u8fde\u63a5\u8d85\u65f6\u53ca\u8f6c\u53d1\u76f8\u5173&#xff1a;<br \/>\nGatewayPorts yes<br \/>\nTCPKeepAlive yes<br \/>\nClientAliveInterval 60<br \/>\nClientAliveCountMax 3<\/p>\n<p>#\u8bc1\u4e66\u76f8\u5173&#xff1a;<br \/>\nPubkeyAuthentication yes<br \/>\nAuthorizedKeysFile      .ssh\/authorized_keys<\/p>\n<p>AllowTcpForwarding yes<\/p>\n<p>(\u5982\u4fee\u6539\u53c2\u6570,\u4fee\u6539\u540e\u91cd\u542fssh\u670d\u52a1)<br \/>\nsystemctl restart sshd <\/p>\n<p>6&#xff1a;\u5b89\u88c5autossh<\/p>\n<p>\u5b89\u88c5\u65b9\u5f0f\u4e00<br \/>\n# \u5b89\u88c5autossh<br \/>\n# CentOS<br \/>\nyum install -y autossh<br \/>\n# Ubuntu<br \/>\napt install -y autossh<\/p>\n<p># \u7f16\u8bd1\u5b89\u88c5&#xff0c;\u5b89\u88c5\u65b9\u5f0f\u4e8c \u5b98\u7f51&#xff1a;https:\/\/www.harding.motd.ca\/autossh\/<br \/>\n$ sudo yum install wget gcc make<br \/>\n#\u4e0b\u8f7d\u5b89\u88c5\u5305<br \/>\n$ wget http:\/\/www.harding.motd.ca\/autossh\/autossh-1.4e.tgz<br \/>\n#\u89e3\u538b<br \/>\n$ tar -xf autossh-1.4e.tgz<br \/>\n#\u8fdb\u5165\u89e3\u538b\u76ee\u5f55<br \/>\n$ cd autossh-1.4e<br \/>\n#\u914d\u7f6e\u6e90\u4ee3\u7801<br \/>\n$ .\/configure<br \/>\n#\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u7f16\u8bd1\u6e90\u4ee3\u7801<br \/>\n$ make<br \/>\n#\u5b89\u88c5 autossh<br \/>\n$ sudo make install<\/p>\n<p>$ which autossh<br \/>\n\/usr\/local\/bin\/autossh<\/p>\n<p>7&#xff1a;\u5728\u5185\u7f51\u670d\u52a1\u5668A\u6267\u884c\u547d\u4ee4\u8fdb\u884c\u7aef\u53e3\u8f6c\u53d1(\u6ce8\u610f\u6b64\u5904\u5982\u679c\u662f\u963f\u91cc\u4e91\u8fd9\u79cd\u4e91\u670d\u52a1\u5668&#xff0c;\u9700\u8981\u5bf9\u76d1\u542c\u7684\u7aef\u53e3\u5f00\u901a\u5b89\u5168\u7ec4)<\/p>\n<p>autossh -M 0 -2 -4 -N  root&#064;47.96.79.177 -p 22 -o ServerAliveInterval&#061;5 -o ServerAliveCountMax&#061;3 -o StrictHostKeyChecking&#061;no -o TCPKeepAlive&#061;yes -R 0.0.0.0:22219:localhost:22 -R 0.0.0.0:22220:localhost:8082 <\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8be5\u547d\u4ee4\u6267\u884c\u5b8c\u6210\u540e&#xff0c;\u4f1a\u5728<span style=\"color:#0000ff\">47.96.79.177<\/span><span style=\"color:#0000ff\">\u4e0a\u6253\u5f00<\/span>22219\u548c22220\u76d1\u542c&#xff0c;\u901a\u8fc7 netstat -anp|grep 22219\u547d\u4ee4\u67e5\u770b22219\u7aef\u53e3\u76d1\u542c\u60c5\u51b5&#xff0c;\u6ce8\u610f\u56fe1\u662f<span style=\"background-color:#ffffff\"><span style=\"color:#4d4d4d\">AllowTcpForwarding yes \u548c GatewayPorts yes\u8fd92\u4e2a\u6ca1\u7528\u5f00\u542f\u6267\u884c\u540e\u7684\u7ed3\u679c&#xff0c;<\/span><\/span>\u56fe2\u662f\u5f00\u542f\u540e\u6267\u884c\u7684\u7ed3\u679c<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"168\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230100-68057cacbd623.png\" width=\"693\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:center\">\u56fe1<\/p>\n<p style=\"margin-left:.0001pt;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"95\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230100-68057cace4e7d.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:center\">\u56fe2<\/p>\n<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u56fe1\u8fd9\u79cd\u53ea\u80fd\u5728<span style=\"color:#0000ff\">47.96.79.177<\/span>\u672c\u5730\u901a\u8fc7ssh -p22219 root&#064;localhost\u8bbf\u95ee\u5185\u7f51&#xff0c;\u56fe2\u5df2\u7ecf\u53ef\u4ee5\u5728\u5176\u4ed6\u5916\u7f51\u670d\u52a1\u5668C\u4e0a\u901a\u8fc7\u547d\u4ee4ssh -p22219 root&#064;<span style=\"color:#0000ff\">47.96.79.177<\/span>\u6765\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668\u4e86<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5173\u4e8e\u56fe1\u548c\u56fe2\u8bbf\u95ee\u4e0d\u540c\u5f97\u539f\u56e0\u8bf4\u660e<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u4e00\u822c\u901a\u8fc7netstat -anp|grep \u7aef\u53e3\u67e5\u770b\u7aef\u53e3\u76d1\u542c\u4fe1\u606f&#xff0c;\u76d1\u542c\u7aef\u53e3\u524d\u9762\u5982\u679c\u662f127.0.0.1\u8bf4\u660e\u53ea\u80fd\u5728\u8be5\u670d\u52a1\u5668\u672c\u5730\u8bbf\u95ee&#xff0c;\u5982\u679c\u76d1\u542c\u7aef\u53e3\u524d\u9762\u5982\u679c\u662f0.0.0.0 \u8bf4\u660e\u53ef\u4ee5\u5728\u5916\u90e8\u8bbf\u95ee\u8be5\u670d\u52a1\u5668\u4e86<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"785\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230101-68057cad15ed4.png\" width=\"867\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u53c2\u6570\u8bf4\u660e&#xff1a;<\/p>\n<p>-N\u00a0\u53c2\u6570\u544a\u8bc9 ssh \u4e0d\u8981\u6267\u884c\u4efb\u4f55\u8fdc\u7a0b\u547d\u4ee4\u3002<\/p>\n<p>-o\u00a0\u53c2\u6570\u8bbe\u7f6e ssh \u7684\u9009\u9879\u3002ServerAliveInterval \u8bbe\u7f6e\u4e3a 5&#xff0c;\u5373\u6bcf 5\u00a0\u79d2 autossh \u5c31\u4f1a\u901a\u8fc7\u52a0\u5bc6\u901a\u9053\u5411\u4e91\u670d\u52a1\u5668\u53d1\u9001\u4e00\u6761\u6d88\u606f&#xff0c;\u4ee5\u8bf7\u6c42\u5176\u54cd\u5e94\u3002\u800c ServerAliveCountMax \u8bbe\u7f6e\u4e3a 3&#xff0c;\u5219\u5f53\u5ba2\u6237\u7aef\u8fde\u7eed 3 \u6b21\u53d1\u9001\u6d88\u606f\u540e\u4ecd\u672a\u6536\u5230\u670d\u52a1\u5668\u7684\u54cd\u5e94\u65f6&#xff0c;autossh \u5c06\u65ad\u5f00\u5e76\u91cd\u65b0\u8fde\u63a5\u3002<\/p>\n<p>-M\u00a0\u53c2\u6570\u7528\u4e8e\u8bbe\u7f6e\u76d1\u63a7\u7aef\u53e3\u3002autossh \u4f1a\u901a\u8fc7\u8fd9\u4e2a\u7aef\u53e3\u53d1\u9001\u6d4b\u8bd5\u6570\u636e&#xff0c;\u5e76\u671f\u671b\u80fd\u4ece\u670d\u52a1\u5668\u90a3\u91cc\u6536\u5230\u56de\u5e94\u3002\u5982\u679c autosssh \u65e0\u6cd5\u901a\u8fc7\u76d1\u63a7\u7aef\u53e3\u6536\u5230\u56de\u5e94&#xff0c;\u5b83\u4f1a\u8ba4\u4e3a tunnel \u5df2\u7ecf\u65ad\u5f00&#xff0c;\u5e76\u5c1d\u8bd5\u91cd\u65b0\u5efa\u7acb\u8fde\u63a5\u3002\u7531\u4e8e\u5df2\u7ecf\u8bbe\u7f6e\u4e86\u00a0-o\u00a0\u9009\u9879&#xff0c;\u56e0\u6b64\u00a0-M\u00a0\u4e3a 0 \u4ea6\u53ef\u3002<\/p>\n<p>  \u6ce8\u610f\u5728\u5b88\u62a4\u8fdb\u7a0b\u4e2d\u8bf7\u4e0d\u8981\u8bbe\u7f6e\u00a0<br \/>\n -f\u00a0\u53c2\u6570\u3002<br \/>\n -f\u00a0\u53c2\u6570\u4f1a\u8ba9 autossh \u5728\u540e\u53f0\u8fd0\u884c&#xff0c;\u8fd9\u610f\u5473\u7740 autossh \u4f1a\u7acb\u5373\u8fd4\u56de&#xff0c;\u800c\u4e0d\u662f\u4e00\u76f4\u8fd0\u884c\u3002\u7136\u800c&#xff0c;\u5bf9\u4e8e systemd \u670d\u52a1\u6765\u8bf4&#xff0c;\u901a\u5e38\u5e0c\u671b\u670d\u52a1\u5728\u524d\u53f0\u8fd0\u884c\u3002 \u5728\u5b88\u62a4\u8fdb\u7a0b\u4e2d&#xff0c;\u4e5f\u53ef\u4ee5\u987a\u4fbf\u52a0\u5165\u00a0<br \/>\n -D 0.0.0.0:7777\u00a0\u5b9e\u73b0 socks5 \u4ee3\u7406\u3002 <\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">8&#xff1a;autossh\u5b9e\u73b0\u5f00\u673a\u81ea\u542f\u52a8\u7aef\u53e3\u6620\u5c04<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">8.1\u3001\u521b\u5efa\u81ea\u542f\u52a8\u811a\u672c<\/p>\n<p># cd\u5230\u8be5\u76ee\u5f55<br \/>\ncd \/etc\/rc.d\/init.d<br \/>\n# \u521b\u5efa\u6587\u4ef6<br \/>\nvi autossh_port.sh<br \/>\n# \u6216 touch autossh_port.sh <\/p>\n<p>8.2\u3001\u521b\u5efa\u597d\u540e\u7f16\u5199\u81ea\u5b9a\u4e49\u542f\u52a8\u811a\u672c\u5185\u5bb9<\/p>\n<p>autossh -M 0 -2 -4 -N  root&#064;47.96.79.177 -p 22 -o ServerAliveInterval&#061;5 -o ServerAliveCountMax&#061;3 -o StrictHostKeyChecking&#061;no -o TCPKeepAlive&#061;yes -R 0.0.0.0:22219:localhost:22 -R 0.0.0.0:22220:localhost:80 <\/p>\n<p>8.3\u3001\u4e3a\u811a\u672c\u6587\u4ef6\u8d4b\u4e88\u6267\u884c\u6743\u9650 \u4f7f\u7528**chmod &#043;x** \u547d\u4ee4\u6807\u8bc6\u5c06\u8be5\u6587\u4ef6\u8bbe\u7f6e\u4e3a\u53ef\u6267\u884c\u6587\u4ef6<\/p>\n<p>chmod &#043;x \/etc\/rc.d\/init.d\/jar_auto.sh \u00a0 \u00a0 \u00a0#\u8d4b\u4e88\u6267\u884c\u6743\u9650 <\/p>\n<p>8.4\u3001\u4e3ajar\u811a\u672c\u8d4b\u4e88\u5f00\u673a\u81ea\u542f\u6743\u9650 \u7f16\u8f91\/etc\/rc.d\u76ee\u5f55\u4e0b\u7684rc.local\u6587\u4ef6&#xff0c;\u5c06jar\u542f\u52a8\u811a\u672c\u52a0\u5165\u8be5\u6587\u4ef6\u4e2d\u5373\u53ef\u3002<\/p>\n<p>vim \/etc\/rc.d\/rc.local <\/p>\n<p>rc.local\u6587\u4ef6\u4e2d\u52a0\u5165jar\u542f\u52a8\u811a\u672c\u6587\u4ef6\u7edd\u5bf9\u8def\u5f84&#xff0c;\u5982\u4e0b&#xff1a;<\/p>\n<p># rc.local\u6587\u4ef6<\/p>\n<p>\/etc\/rc.d\/init.d\/autossh_port.sh <\/p>\n<p>\u5982\u56fe&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"499\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230101-68057cad636cf.png\" width=\"841\" \/><\/p>\n<p>8.5\u3001\u8d4b\u4e88\/etc\/rc.d\/rc.local\u6587\u4ef6\u6267\u884c\u6743\u9650 \u5c06jar\u811a\u672c\u6587\u4ef6\u76ee\u5f55\u6dfb\u52a0\u5230rc.local\u6587\u4ef6\u540e&#xff0c;\u9700\u8981\u4e3a\u6587\u4ef6\u91cd\u65b0\u8d4b\u4e88\u6267\u884c\u6743\u9650&#xff0c;\u6267\u884c**chmod -x**\u547d\u4ee4<\/p>\n<p>chmod &#043;x \/etc\/rc.d\/rc.local <\/p>\n<p>8.6\u3001\u4f7f\u7528reboot\u547d\u4ee4\u91cd\u542fLinux\u7cfb\u7edf&#xff0c;\u4f7f\u7528ps -ef | grep buss-admin \u547d\u4ee4\u67e5\u770b\u662f\u5426\u542f\u52a8\u6210\u529f&#xff01; # \u91cd\u542f\u7cfb\u7edf<\/p>\n<p>reboot <\/p>\n<p>\u81f3\u6b64autossh\u5b9e\u73b0\u5f00\u673a\u81ea\u542f\u52a8\u7aef\u53e3\u6620\u5c04\u6210\u529f&#xff0c;\u53ef\u4ee5\u901a\u8fc7 ps -ef | grep autossh \u67e5\u770b\u542f\u52a8\u60c5\u51b5&#xff0c;\u5982\u56fe&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"137\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230101-68057cada3e05.png\" width=\"1200\" \/><\/p>\n<\/p>\n<p>9&#xff1a;\u4e3a\u4e86\u4fdd\u8bc1autossh\u7a33\u5b9a\u4e0d\u6389\u7ebf&#xff0c;\u53ef\u4ee5\u8bbe\u7f6e\u5b9a\u65f6\u6740\u6389autossh\u8fdb\u7a0b&#xff0c;\u7136\u540e\u518d\u91cd\u542f<\/p>\n<p>\u521b\u5efa\u5b9a\u65f6\u811a\u672cautossh_sechduled.sh<\/p>\n<p>[root&#064;localhost home]# vi autossh_sechduled.sh <\/p>\n<p>\u5728\u811a\u672c\u4e2d\u5199\u5165\u5982\u4e0b\u5185\u5bb9,\u5e76\u4fdd\u5b58<\/p>\n<p>#!\/bin\/bash<br \/>\npids&#061;$(pgrep autossh)<br \/>\necho $pids<br \/>\nfor pid in $pids; do<br \/>\n    kill $pid<br \/>\ndone<\/p>\n<p>\/usr\/local\/bin\/autossh -M 0 -2 -4 -Nf  root&#064;47.96.79.177 -p 22 -o ServerAliveInterval&#061;5 -o ServerAliveCountMax&#061;3 -o StrictHostKeyChecking&#061;no -o TCPKeepAlive&#061;yes -R 0.0.0.0:22219:localhost:22 -R 0.0.0.0:22220:localhost:80<\/p>\n<p>echo &#034;reset success&#034; <\/p>\n<p>\u7ed9\u811a\u672c\u6267\u884c\u6743\u9650<\/p>\n<p>[root&#064;localhost home]# chmod &#043;x \/home\/autossh_sechduled.sh <\/p>\n<p>\u901a\u8fc7crontab -e \u6307\u5b9a\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u811a\u672c<\/p>\n<p>[root&#064;localhost home]# crontab -e <\/p>\n<p>\u4e0b\u9762\u8fd9\u4e2a\u662f\u6307\u5b9a\u811a\u672c\u57286\u70b9\u548c12\u70b9\u6267\u884c<\/p>\n<p>0 6 * * * sh \/home\/autossh_sechduled.sh<\/p>\n<p>0 12 * * * sh \/home\/autossh_sechduled.sh<\/p>\n<p>\u586b\u5199\u5b8c\u6210\u540e\u4fdd\u5b58&#xff0c;\u5b9a\u65f6\u4efb\u52a1\u6307\u5b9a\u5c31\u597d\u4e86&#xff0c;\u5230\u70b9\u5c31\u4f1a\u6267\u884c\u5b9a\u65f6\u4efb\u52a1<\/p>\n<\/p>\n<p>\u6587\u7ae0\u53c2\u8003&#xff1a;https:\/\/zhuanlan.zhihu.com\/p\/680289253<\/p>\n<p>AutoSSH\u5e38\u7528\u53c2\u6570\u89e3\u91ca \u5b98\u65b9\u6587\u6863&#xff1a;https:\/\/www.harding.motd.ca\/autossh\/README.txt<\/p>\n<p>https:\/\/www.escapelife.site\/posts\/e6647650.html<\/p>\n<p>https:\/\/www.yuque.com\/listenstar\/ygqknt\/go0939<\/p>\n<p>AutoSSH\u53ea\u6709\u4e09\u4e2a\u81ea\u5df1\u7684\u53c2\u6570&#xff1a;<\/p>\n<p>\u53c2\u6570\u00a0\u00a0 \u00a0\u89e3\u91ca -M\u00a0\u00a0 \u00a0-M port[:echo_port] &#xff1b;\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u76d1\u63a7\u7aef\u53e3\u548cecho\u7684\u7aef\u53e3&#xff0c;\u7528\u4e8e\u81ea\u52a8\u91cd\u8fde -f\u00a0\u00a0 \u00a0\u4f7fautossh\u5728\u8fd0\u884cssh\u4e4b\u524d\u8fdb\u5165\u540e\u53f0\u3002\u548cssh\u7684-f\u51b2\u7a81&#xff0c;\u4f7f\u7528\u6b64\u53c2\u6570\u9700\u8981\u5148\u914d\u7f6e\u597d\u516c\u94a5\u767b\u5f55\u3002 -V\u00a0\u00a0 \u00a0\u67e5\u770b\u7248\u672c\u53f7 \u5176\u4f59\u53c2\u6570\u00a0\u00a0 \u00a0\u5176\u4f59\u53c2\u6570\u4f7f\u7528\u7684\u662fssh\u53c2\u6570<\/p>\n<p>SSH\u5e38\u7528\u53c2\u6570&#xff1a; https:\/\/segmentfault.com\/a\/1190000021888536 https:\/\/www.linuxcool.com\/ssh https:\/\/wangchujiang.com\/linux-command\/c\/ssh.html<\/p>\n<p>\u53c2\u6570\u00a0\u00a0 \u00a0\u542b\u4e49\u8bf4\u660e -1\u00a0\u00a0 \u00a0\u5f3a\u5236\u4f7f\u7528ssh\u534f\u8bae\u7248\u672c1 -2\u00a0\u00a0 \u00a0\u5f3a\u5236\u4f7f\u7528ssh\u534f\u8bae\u7248\u672c2 -4\u00a0\u00a0 \u00a0\u5f3a\u5236\u4f7f\u7528IPv4\u5730\u5740 -6\u00a0\u00a0 \u00a0\u5f3a\u5236\u4f7f\u7528IPv6\u5730\u5740 -A\u00a0\u00a0 \u00a0\u5f00\u542f\u8ba4\u8bc1\u4ee3\u7406\u8fde\u63a5\u8f6c\u53d1\u529f\u80fd -a\u00a0\u00a0 \u00a0\u5173\u95ed\u8ba4\u8bc1\u4ee3\u7406\u8fde\u63a5\u8f6c\u53d1\u529f\u80fd -b\u00a0\u00a0 \u00a0\u4f7f\u7528\u672c\u673a\u6307\u5b9a\u5730\u5740\u4f5c\u4e3a\u5bf9\u5e94\u8fde\u63a5\u7684\u6e90ip\u5730\u5740 -C\u00a0\u00a0 \u00a0\u8bf7\u6c42\u538b\u7f29\u6240\u6709\u6570\u636e -c\u00a0\u00a0 \u00a0\u9009\u62e9\u6240\u52a0\u5bc6\u7684\u5bc6\u7801\u578b\u5f0f &#xff08;blowfish -e\u00a0\u00a0 \u00a0\u8bbe\u5b9a\u8df3\u8131\u5b57\u7b26 -F\u00a0\u00a0 \u00a0\u6307\u5b9assh\u6307\u4ee4\u7684\u914d\u7f6e\u6587\u4ef6 -f\u00a0\u00a0 \u00a0\u540e\u53f0\u8fd0\u884cssh -g\u00a0\u00a0 \u00a0\u5141\u8bb8\u8fdc\u7a0b\u4e3b\u673a\u8fde\u63a5\u4e3b\u673a\u7684\u8f6c\u53d1\u7aef\u53e3 -i\u00a0\u00a0 \u00a0\u6307\u5b9a\u5bc6\u94a5\u5bf9\u8eab\u4efd\u6587\u4ef6&#xff08;\u9884\u8bbe\u662f\u5728\u4f7f\u7528\u8005\u7684\u5bb6\u76ee\u5f55 \u4e2d\u7684 .ssh\/identity&#xff09; -l\u00a0\u00a0 \u00a0\u6307\u5b9a\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u767b\u5f55\u7528\u6237\u540d -N\u00a0\u00a0 \u00a0\u4e0d\u6267\u884c\u8fdc\u7a0b\u6307\u4ee4 -n\u00a0\u00a0 \u00a0\u91cd\u5b9a\u5411stdin \u5230 \/dev\/null&#xff1b;(\u8981\u914d\u5408 -f \u53c2\u6570\u4f7f\u7528) -o\u00a0\u00a0 \u00a0\u6307\u5b9a\u914d\u7f6e\u9009\u9879 -p\u00a0\u00a0 \u00a0\u6307\u5b9a\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u7aef\u53e3&#xff08;\u9ed8\u8ba422&#xff09; -P\u00a0\u00a0 \u00a0\u4f7f\u7528\u975e\u7279\u5b9a\u7684 port \u53bb\u5bf9\u5916\u8054\u673a&#xff08;\u6ce8\u610f\u8fd9\u4e2a\u9009\u9879\u4f1a\u5173\u6389 RhostsAuthentication \u548c RhostsRSAAuthentication&#xff09; -q\u00a0\u00a0 \u00a0\u5b89\u9759\u6a21\u5f0f\u8fd0\u884c&#xff1b;\u5ffd\u7565\u63d0\u793a\u548c\u9519\u8bef -T\u00a0\u00a0 \u00a0\u4e0d\u5360\u7528shell\u7ec8\u7aef,\u7981\u6b62\u5206\u914dpseudo-tty(\u4f2a\u7ec8\u7aef) -t\u00a0\u00a0 \u00a0\u5f3a\u5236\u914d\u7f6epseudo-tty(\u4f2a\u7ec8\u7aef) -v\u00a0\u00a0 \u00a0\u6253\u5370\u66f4\u8be6\u7ec6\u4fe1\u606f -X\u00a0\u00a0 \u00a0\u5f00\u542fX11\u8f6c\u53d1\u529f\u80fd -x\u00a0\u00a0 \u00a0\u5173\u95edX11\u8f6c\u53d1\u529f\u80fd -y\u00a0\u00a0 \u00a0\u5f00\u542f\u4fe1\u4efbX11\u8f6c\u53d1\u529f\u80fd -L\u00a0\u00a0 \u00a0listen-port:host:port \u6307\u6d3e\u672c\u5730\u7684 port \u8f6c\u53d1\u5230\u670d\u52a1\u5668\u4e0a\u7684 port; \u5efa\u7acb\u672c\u5730SSH\u96a7\u9053(\u672c\u5730\u5ba2\u6237\u7aef\u5efa\u7acb\u76d1\u542c\u7aef\u53e3); \u5c06\u672c\u5730\u673a(\u5ba2\u6237\u673a)\u7684\u67d0\u4e2a\u7aef\u53e3\u8f6c\u53d1\u5230\u8fdc\u7aef\u6307\u5b9a\u673a\u5668\u7684\u6307\u5b9a\u7aef\u53e3. -R\u00a0\u00a0 \u00a0listen-port:host:port \u5c06\u8fdc\u7a0b\u673a\u5668\u4e0a\u7684 port \u8f6c\u53d1\u5230\u6307\u5b9aIP\u7684port&#xff1b; \u5efa\u7acb\u8fdc\u7a0bSSH\u96a7\u9053(\u96a7\u9053\u670d\u52a1\u7aef\u5efa\u7acb\u76d1\u542c\u7aef\u53e3)&#xff1b; \u5c06\u8fdc\u7a0b\u4e3b\u673a(\u670d\u52a1\u5668)\u7684\u67d0\u4e2a\u7aef\u53e3\u8f6c\u53d1\u5230\u672c\u5730\u7aef\u6307\u5b9a\u673a\u5668\u7684\u6307\u5b9a\u7aef\u53e3. -D\u00a0\u00a0 \u00a0port \u6307\u5b9a\u4e00\u4e2a\u672c\u5730\u673a\u5668 \u201c\u52a8\u6001\u7684\u2019\u2019 \u5e94\u7528\u7a0b\u5e8f\u7aef\u53e3\u8f6c\u53d1.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.7k\u6b21\uff0c\u70b9\u8d5e7\u6b21\uff0c\u6536\u85cf6\u6b21\u3002\u4e00\u822c\u901a\u8fc7netstat -anp|grep \u7aef\u53e3\u67e5\u770b\u7aef\u53e3\u76d1\u542c\u4fe1\u606f\uff0c\u76d1\u542c\u7aef\u53e3\u524d\u9762\u5982\u679c\u662f127.0.0.1\u8bf4\u660e\u53ea\u80fd\u5728\u8be5\u670d\u52a1\u5668\u672c\u5730\u8bbf\u95ee\uff0c\u5982\u679c\u76d1\u542c\u7aef\u53e3\u524d\u9762\u5982\u679c\u662f0.0.0.0 \u8bf4\u660e\u53ef\u4ee5\u5728\u5916\u90e8\u8bbf\u95ee\u8be5\u670d\u52a1\u5668\u4e86\u3002\u5982\u679c\u672c\u5730\u6709\u516c\u7f51ip\uff0c\u6bd4\u5982\u8fde\u63a5\u7684\u5bbd\u5e26\u6709\u516c\u7f51ip\uff0c\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u8def\u7531\u914d\u7f6e\u8f6c\u53d1\u5c31\u884c\u4e86\uff0c\u5982\u679c\u672c\u5730\u6ca1\u6709\u516c\u7f51ip\uff0c\u90a3\u5c31\u9700\u8981\u901a\u8fc7\u4e0b\u9762\u8fd9\u79cd\u65b9\u5f0f\u6765\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668\u4e86\u30022\uff1a\u51c6\u5907\u4e09\u53f0\u670d\u52a1\uff0c\u4e00\u53f0\u662f\u5185\u7f51\u670d\u52a1\u5668A\uff0c\u4e00\u53f0\u662f\u963f\u91cc\u4e91\u516c\u7f51\u670d\u52a1\u5668B(3\uff1a\u5185\u7f51\u670d\u52a1\u5668A\u548c\u516c\u7f51\u670d\u52a1\u5668B\u4e92\u76f8\u540c\u6b65\u5bc6\u5319\uff0c\u51c6\u5907\u5185\u7f51\u670d\u52a1\u5668A\u5bc6\u5319\u3002)\uff0c\u4e00\u53f0\u662f\u5176\u4ed6\u53ef\u4ee5\u8bbf\u95ee\u5916\u7f51\u7684\u8bbe\u5907C\u3002_\u5185\u7f51\u6620\u5c04<\/p>\n","protected":false},"author":2,"featured_media":30992,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,78,44],"topic":[],"class_list":["post-30999","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-43","tag-78","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\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\/30999.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.7k\u6b21\uff0c\u70b9\u8d5e7\u6b21\uff0c\u6536\u85cf6\u6b21\u3002\u4e00\u822c\u901a\u8fc7netstat -anp|grep \u7aef\u53e3\u67e5\u770b\u7aef\u53e3\u76d1\u542c\u4fe1\u606f\uff0c\u76d1\u542c\u7aef\u53e3\u524d\u9762\u5982\u679c\u662f127.0.0.1\u8bf4\u660e\u53ea\u80fd\u5728\u8be5\u670d\u52a1\u5668\u672c\u5730\u8bbf\u95ee\uff0c\u5982\u679c\u76d1\u542c\u7aef\u53e3\u524d\u9762\u5982\u679c\u662f0.0.0.0 \u8bf4\u660e\u53ef\u4ee5\u5728\u5916\u90e8\u8bbf\u95ee\u8be5\u670d\u52a1\u5668\u4e86\u3002\u5982\u679c\u672c\u5730\u6709\u516c\u7f51ip\uff0c\u6bd4\u5982\u8fde\u63a5\u7684\u5bbd\u5e26\u6709\u516c\u7f51ip\uff0c\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u8def\u7531\u914d\u7f6e\u8f6c\u53d1\u5c31\u884c\u4e86\uff0c\u5982\u679c\u672c\u5730\u6ca1\u6709\u516c\u7f51ip\uff0c\u90a3\u5c31\u9700\u8981\u901a\u8fc7\u4e0b\u9762\u8fd9\u79cd\u65b9\u5f0f\u6765\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668\u4e86\u30022\uff1a\u51c6\u5907\u4e09\u53f0\u670d\u52a1\uff0c\u4e00\u53f0\u662f\u5185\u7f51\u670d\u52a1\u5668A\uff0c\u4e00\u53f0\u662f\u963f\u91cc\u4e91\u516c\u7f51\u670d\u52a1\u5668B(3\uff1a\u5185\u7f51\u670d\u52a1\u5668A\u548c\u516c\u7f51\u670d\u52a1\u5668B\u4e92\u76f8\u540c\u6b65\u5bc6\u5319\uff0c\u51c6\u5907\u5185\u7f51\u670d\u52a1\u5668A\u5bc6\u5319\u3002)\uff0c\u4e00\u53f0\u662f\u5176\u4ed6\u53ef\u4ee5\u8bbf\u95ee\u5916\u7f51\u7684\u8bbe\u5907C\u3002_\u5185\u7f51\u6620\u5c04\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/30999.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-20T23:01:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230100-68057cac241a7.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=\"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\/30999.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/30999.html\",\"name\":\"\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-20T23:01:02+00:00\",\"dateModified\":\"2025-04-20T23:01:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/30999.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/30999.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/30999.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\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":"\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\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\/30999.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.7k\u6b21\uff0c\u70b9\u8d5e7\u6b21\uff0c\u6536\u85cf6\u6b21\u3002\u4e00\u822c\u901a\u8fc7netstat -anp|grep \u7aef\u53e3\u67e5\u770b\u7aef\u53e3\u76d1\u542c\u4fe1\u606f\uff0c\u76d1\u542c\u7aef\u53e3\u524d\u9762\u5982\u679c\u662f127.0.0.1\u8bf4\u660e\u53ea\u80fd\u5728\u8be5\u670d\u52a1\u5668\u672c\u5730\u8bbf\u95ee\uff0c\u5982\u679c\u76d1\u542c\u7aef\u53e3\u524d\u9762\u5982\u679c\u662f0.0.0.0 \u8bf4\u660e\u53ef\u4ee5\u5728\u5916\u90e8\u8bbf\u95ee\u8be5\u670d\u52a1\u5668\u4e86\u3002\u5982\u679c\u672c\u5730\u6709\u516c\u7f51ip\uff0c\u6bd4\u5982\u8fde\u63a5\u7684\u5bbd\u5e26\u6709\u516c\u7f51ip\uff0c\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u8def\u7531\u914d\u7f6e\u8f6c\u53d1\u5c31\u884c\u4e86\uff0c\u5982\u679c\u672c\u5730\u6ca1\u6709\u516c\u7f51ip\uff0c\u90a3\u5c31\u9700\u8981\u901a\u8fc7\u4e0b\u9762\u8fd9\u79cd\u65b9\u5f0f\u6765\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668\u4e86\u30022\uff1a\u51c6\u5907\u4e09\u53f0\u670d\u52a1\uff0c\u4e00\u53f0\u662f\u5185\u7f51\u670d\u52a1\u5668A\uff0c\u4e00\u53f0\u662f\u963f\u91cc\u4e91\u516c\u7f51\u670d\u52a1\u5668B(3\uff1a\u5185\u7f51\u670d\u52a1\u5668A\u548c\u516c\u7f51\u670d\u52a1\u5668B\u4e92\u76f8\u540c\u6b65\u5bc6\u5319\uff0c\u51c6\u5907\u5185\u7f51\u670d\u52a1\u5668A\u5bc6\u5319\u3002)\uff0c\u4e00\u53f0\u662f\u5176\u4ed6\u53ef\u4ee5\u8bbf\u95ee\u5916\u7f51\u7684\u8bbe\u5907C\u3002_\u5185\u7f51\u6620\u5c04","og_url":"https:\/\/www.wsisp.com\/helps\/30999.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-20T23:01:02+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250420230100-68057cac241a7.png"}],"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\/30999.html","url":"https:\/\/www.wsisp.com\/helps\/30999.html","name":"\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-20T23:01:02+00:00","dateModified":"2025-04-20T23:01:02+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/30999.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/30999.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/30999.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5185\u5916\u7f51\u6620\u5c04\u8bbf\u95ee\u5185\u7f51\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\/30999","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=30999"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/30999\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/30992"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=30999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=30999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=30999"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=30999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}