{"id":76831,"date":"2026-02-23T11:50:13","date_gmt":"2026-02-23T03:50:13","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/76831.html"},"modified":"2026-02-23T11:50:13","modified_gmt":"2026-02-23T03:50:13","slug":"ssh%e9%9a%a7%e9%81%93%e8%bf%9b%e9%98%b6%e7%8e%a9%e6%b3%95%ef%bc%9a%e7%94%a8mac%e5%bd%93%e8%b7%b3%e6%9d%bf%e6%9c%ba%e5%ae%9e%e7%8e%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%8f%8c%e7%bd%91%e5%8d%a1%e9%9a%94","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/76831.html","title":{"rendered":"SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09"},"content":{"rendered":"<h2>SSH\u96a7\u9053\u5728\u4f01\u4e1a\u7ea7\u53cc\u7f51\u5361\u9694\u79bb\u73af\u5883\u4e2d\u7684\u9ad8\u9636\u5e94\u7528&#xff08;2024 Mac\u5b9e\u6218\u6307\u5357&#xff09;<\/h2>\n<h3>1. \u4f01\u4e1a\u7ea7\u7f51\u7edc\u9694\u79bb\u573a\u666f\u7684\u6838\u5fc3\u6311\u6218<\/h3>\n<p>\u5728\u91d1\u878d\u3001\u533b\u7597\u7b49\u5bf9\u6570\u636e\u5b89\u5168\u8981\u6c42\u4e25\u683c\u7684\u884c\u4e1a&#xff0c;\u751f\u4ea7\u670d\u52a1\u5668\u901a\u5e38\u91c7\u7528\u53cc\u7f51\u5361\u67b6\u6784\u5b9e\u73b0\u5185\u5916\u7f51\u7269\u7406\u9694\u79bb\u3002\u8fd9\u79cd\u8bbe\u8ba1\u867d\u7136\u6709\u6548\u964d\u4f4e\u4e86\u653b\u51fb\u9762&#xff0c;\u5374\u7ed9\u65e5\u5e38\u8fd0\u7ef4\u5e26\u6765\u4e86\u4e09\u5927\u75db\u70b9&#xff1a;<\/p>\n<li>\u5916\u7f51\u4f9d\u8d56\u5de5\u5177\u94fe\u5931\u6548&#xff1a;pip\/conda\u7b49\u5305\u7ba1\u7406\u5de5\u5177\u3001yum\/apt\u7cfb\u7edf\u66f4\u65b0\u6e90\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee<\/li>\n<li>\u7d27\u6025\u6545\u969c\u6392\u67e5\u53d7\u963b&#xff1a;\u65e0\u6cd5\u5feb\u901f\u67e5\u8be2\u516c\u5f00\u6280\u672f\u6587\u6863\u6216\u4e0b\u8f7d\u8bca\u65ad\u5de5\u5177<\/li>\n<li>CI\/CD\u6d41\u7a0b\u4e2d\u65ad&#xff1a;\u81ea\u52a8\u5316\u6784\u5efa\u7cfb\u7edf\u65e0\u6cd5\u83b7\u53d6\u5916\u90e8\u4f9d\u8d56\u9879<\/li>\n<p>\u4f20\u7edf\u89e3\u51b3\u65b9\u6848\u5982\u7269\u7406\u5207\u6362\u7f51\u7ebf\u6216\u914d\u7f6e\u590d\u6742\u8def\u7531\u89c4\u5219&#xff0c;\u4e0d\u4ec5\u64cd\u4f5c\u7e41\u7410&#xff0c;\u8fd8\u4f1a\u5f15\u5165\u65b0\u7684\u5b89\u5168\u98ce\u9669\u3002\u6211\u4eec\u5b9e\u6d4b\u53d1\u73b0&#xff0c;\u57fa\u4e8eSSH\u96a7\u9053\u7684\u8df3\u677f\u65b9\u6848\u53ef\u5b8c\u7f8e\u5e73\u8861\u5b89\u5168\u4e0e\u6548\u7387\u9700\u6c42\u3002<\/p>\n<h3>2. \u96f6\u4fe1\u4efb\u67b6\u6784\u4e0b\u7684SSH\u96a7\u9053\u65b9\u6848\u8bbe\u8ba1<\/h3>\n<h4>2.1 \u57fa\u7840\u67b6\u6784\u539f\u7406<\/h4>\n<p># \u6ce8\u610f&#xff1a;\u6839\u636e\u89c4\u8303\u8981\u6c42&#xff0c;\u6b64\u5904\u4e0d\u5e94\u5305\u542bmermaid\u56fe\u8868&#xff0c;\u6539\u4e3a\u6587\u5b57\u63cf\u8ff0<\/p>\n<p>\u5178\u578b\u6570\u636e\u6d41\u5411&#xff1a;<\/p>\n<li>\u5185\u7f51\u670d\u52a1\u5668\u53d1\u8d77\u8bf7\u6c42\u5230\u8df3\u677f\u673a\u768410991\u7aef\u53e3&#xff08;\u793a\u4f8b\u7aef\u53e3&#xff09;<\/li>\n<li>\u8df3\u677f\u673a\u901a\u8fc7\u5916\u7f51\u7f51\u5361\u5c06\u8bf7\u6c42\u8f6c\u53d1\u81f3\u76ee\u6807\u7f51\u7ad9<\/li>\n<li>\u54cd\u5e94\u6570\u636e\u6cbf\u539f\u8def\u5f84\u8fd4\u56de<\/li>\n<p>\u5173\u952e\u5b89\u5168\u7279\u6027&#xff1a;<\/p>\n<ul>\n<li>\u5355\u5411\u901a\u9053&#xff1a;\u4ec5\u5141\u8bb8\u5185\u7f51\u5411\u5916\u53d1\u8d77\u8fde\u63a5<\/li>\n<li>\u534f\u8bae\u8fc7\u6ee4&#xff1a;\u4ec5\u4ee3\u7406HTTP\/HTTPS\u6d41\u91cf<\/li>\n<li>\u8bbf\u95ee\u65e5\u5fd7&#xff1a;\u5b8c\u6574\u8bb0\u5f55\u6240\u6709\u4ee3\u7406\u8bf7\u6c42<\/li>\n<\/ul>\n<h4>2.2 \u73af\u5883\u51c6\u5907\u6e05\u5355<\/h4>\n<table>\n<tr>\u7ec4\u4ef6\u914d\u7f6e\u8981\u6c42\u5907\u6ce8<\/tr>\n<tbody>\n<tr>\n<td>Mac\u8df3\u677f\u673a<\/td>\n<td>macOS 12&#043;<\/td>\n<td>\u9700\u5f00\u542fSSH\u8fdc\u7a0b\u767b\u5f55\u6743\u9650<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u7f51\u670d\u52a1\u5668<\/td>\n<td>\u4efb\u610fLinux\u53d1\u884c\u7248<\/td>\n<td>\u9700\u80fd\u8fde\u901a\u8df3\u677f\u673a\u5185\u7f51IP<\/td>\n<\/tr>\n<tr>\n<td>\u7f51\u7edc\u9632\u706b\u5899<\/td>\n<td>\u5f00\u653e\u8df3\u677f\u673a10991\u7aef\u53e3\u5165\u7ad9<\/td>\n<td>\u5efa\u8bae\u8bbe\u7f6eIP\u767d\u540d\u5355<\/td>\n<\/tr>\n<tr>\n<td>SSH\u5ba2\u6237\u7aef<\/td>\n<td>OpenSSH 8.2&#043;<\/td>\n<td>\u652f\u6301ProxyJump\u7279\u6027<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>3. \u5168\u81ea\u52a8\u914d\u7f6e\u5b9e\u6218\u6d41\u7a0b<\/h3>\n<h4>3.1 \u8df3\u677f\u673aSquid\u4ee3\u7406\u914d\u7f6e<\/h4>\n<p># \u5b89\u88c5SquidMan&#xff08;\u53ef\u89c6\u5316\u4ee3\u7406\u7ba1\u7406\u5de5\u5177&#xff09;<br \/>\nbrew install &#8211;cask squidman<\/p>\n<p># \u9a8c\u8bc1\u5b89\u88c5<br \/>\n\/Applications\/SquidMan.app\/Contents\/MacOS\/SquidMan -v<\/p>\n<p>\u914d\u7f6e\u8981\u70b9&#xff1a;<\/p>\n<li>\u8fdb\u5165Clients\u6807\u7b7e\u9875&#xff0c;\u786e\u4fdd\u8bbf\u95ee\u63a7\u5236\u5217\u8868\u4e3a\u7a7a<\/li>\n<li>\u5728Template\u4e2d\u5c06\u9ed8\u8ba4\u7684deny all\u6539\u4e3aallow all<\/li>\n<li>\u8bbe\u7f6e\u76d1\u542c\u7aef\u53e3\u4e3a10991&#xff08;\u9700\u4e0e\u9632\u706b\u5899\u767d\u540d\u5355\u4e00\u81f4&#xff09;<\/li>\n<p>\u5b89\u5168\u63d0\u793a&#xff1a;\u751f\u4ea7\u73af\u5883\u5efa\u8bae\u914d\u7f6eIP\u767d\u540d\u5355\u548cBasic\u8ba4\u8bc1&#xff0c;\u6b64\u5904\u4e3a\u6f14\u793a\u7b80\u5316<\/p>\n<h4>3.2 \u670d\u52a1\u5668\u7aef\u667a\u80fd\u914d\u7f6e\u811a\u672c<\/h4>\n<p>#!\/usr\/bin\/env python3<br \/>\nimport subprocess<br \/>\nimport re<\/p>\n<p>def get_jump_host_ip():<br \/>\n    ssh_process &#061; subprocess.Popen([&#039;ssh&#039;, &#039;-T&#039;, &#039;user&#064;jump_host&#039;],<br \/>\n                                  stdout&#061;subprocess.PIPE,<br \/>\n                                  stderr&#061;subprocess.PIPE)<br \/>\n    _, stderr &#061; ssh_process.communicate()<br \/>\n    return re.search(r&#039;from (\\\\d&#043;\\\\.\\\\d&#043;\\\\.\\\\d&#043;\\\\.\\\\d&#043;)&#039;, stderr.decode()).group(1)<\/p>\n<p>def configure_proxy(ip):<br \/>\n    with open(f&#039;{os.environ[&#034;HOME&#034;]}\/.bashrc&#039;, &#039;a&#039;) as f:<br \/>\n        f.write(f&#039;\\\\nexport http_proxy&#061;http:\/\/{ip}:10991\\\\nexport https_proxy&#061;http:\/\/{ip}:10991\\\\n&#039;)<br \/>\n    subprocess.run([&#039;source ~\/.bashrc&#039;], shell&#061;True)<\/p>\n<p>if __name__ &#061;&#061; &#039;__main__&#039;:<br \/>\n    jump_ip &#061; get_jump_host_ip()<br \/>\n    configure_proxy(jump_ip)<br \/>\n    print(f&#034;Proxy configured: {jump_ip}:10991&#034;)<\/p>\n<p>\u8be5\u811a\u672c\u81ea\u52a8\u5b8c\u6210&#xff1a;<\/p>\n<ul>\n<li>\u63d0\u53d6\u8df3\u677f\u673a\u8fde\u63a5IP<\/li>\n<li>\u8ffd\u52a0\u73af\u5883\u53d8\u91cf\u5230.bashrc<\/li>\n<li>\u907f\u514d\u914d\u7f6e\u4e22\u5931\u7684\u5e38\u89c1\u95ee\u9898<\/li>\n<\/ul>\n<h3>4. \u4f01\u4e1a\u7ea7\u589e\u5f3a\u65b9\u6848<\/h3>\n<h4>4.1 \u9ad8\u53ef\u7528\u67b6\u6784\u8bbe\u8ba1<\/h4>\n<p># \u591a\u8df3\u677f\u673a\u8d1f\u8f7d\u5747\u8861\u914d\u7f6e\u793a\u4f8b<br \/>\nexport http_proxy&#061;&#034;http:\/\/jump1:10991 http:\/\/jump2:10991&#034;<br \/>\nexport no_proxy&#061;&#034;*.internal,10.*,192.168.*&#034;<\/p>\n<p>\u5173\u952e\u4f18\u5316\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u5fc3\u8df3\u68c0\u6d4b&#xff1a;\u81ea\u52a8\u5207\u6362\u6545\u969c\u8282\u70b9<\/li>\n<li>\u6d41\u91cf\u63a7\u5236&#xff1a;\u9650\u5236\u5355\u8fde\u63a5\u5e26\u5bbd<\/li>\n<li>\u5ba1\u8ba1\u65e5\u5fd7&#xff1a;\u8bb0\u5f55\u6240\u6709\u4ee3\u7406\u8bf7\u6c42<\/li>\n<\/ul>\n<h4>4.2 \u5b89\u5168\u52a0\u56fa\u63aa\u65bd<\/h4>\n<li>\n<p>\u8bc1\u4e66\u8ba4\u8bc1&#xff1a;<\/p>\n<p>ssh-keygen -t ed25519 -f ~\/.ssh\/jump_key<br \/>\nssh-copy-id -i ~\/.ssh\/jump_key.pub user&#064;jump_host<\/p>\n<\/li>\n<li>\n<p>\u7aef\u53e3\u9690\u85cf&#xff1a;<\/p>\n<p># \u4f7f\u7528\u975e\u6807\u51c6\u7aef\u53e3&#043;\u9632\u706b\u5899\u767d\u540d\u5355<br \/>\niptables -A INPUT -p tcp &#8211;dport 54321 -s 10.0.0.0\/24 -j ACCEPT<\/p>\n<\/li>\n<li>\n<p>\u6d41\u91cf\u52a0\u5bc6&#xff1a;<\/p>\n<p># \u5728SSH\u96a7\u9053\u4e2d\u5d4c\u5957\u52a0\u5bc6\u4ee3\u7406<br \/>\nssh -D 1080 user&#064;jump_host<\/p>\n<\/li>\n<h3>5. \u5178\u578b\u95ee\u9898\u6392\u67e5\u6307\u5357<\/h3>\n<h4>5.1 \u8fde\u63a5\u6d4b\u8bd5\u77e9\u9635<\/h4>\n<table>\n<tr>\u6d4b\u8bd5\u547d\u4ee4\u9884\u671f\u7ed3\u679c\u5931\u8d25\u6392\u67e5\u70b9<\/tr>\n<tbody>\n<tr>\n<td>curl -v http:\/\/example.com<\/td>\n<td>\u8fd4\u56de\u5b8c\u6574HTML<\/td>\n<td>\u8df3\u677f\u673aSquid\u670d\u52a1\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td>telnet jump_ip 10991<\/td>\n<td>\u663e\u793aConnected<\/td>\n<td>\u7f51\u7edc\u9632\u706b\u5899\u89c4\u5219<\/td>\n<\/tr>\n<tr>\n<td>&#096;env<\/td>\n<td>grep proxy&#096;<\/td>\n<td>\u663e\u793a\u6b63\u786e\u4ee3\u7406\u53d8\u91cf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5.2 \u6027\u80fd\u4f18\u5316\u53c2\u6570<\/h4>\n<p># \u8c03\u6574SSH\u96a7\u9053\u53c2\u6570&#xff08;\u6dfb\u52a0\u5230\/etc\/ssh\/ssh_config&#xff09;<br \/>\nHost jump_host<br \/>\n    Compression yes<br \/>\n    ServerAliveInterval 60<br \/>\n    TCPKeepAlive yes<br \/>\n    ControlMaster auto<br \/>\n    ControlPath ~\/.ssh\/%r&#064;%h:%p<\/p>\n<p>\u5b9e\u6d4b\u6570\u636e\u5bf9\u6bd4&#xff1a;<\/p>\n<ul>\n<li>\u542f\u7528\u538b\u7f29\u540e&#xff1a;\u4f20\u8f93\u4f53\u79ef\u51cf\u5c1140-60%<\/li>\n<li>KeepAlive\u8bbe\u7f6e&#xff1a;\u8fde\u63a5\u5efa\u7acb\u65f6\u95f4\u7f29\u77ed80%<\/li>\n<\/ul>\n<h3>6. \u6269\u5c55\u5e94\u7528\u573a\u666f<\/h3>\n<h4>6.1 \u6301\u7eed\u96c6\u6210\u7cfb\u7edf\u96c6\u6210<\/h4>\n<p># GitLab CI\u793a\u4f8b<br \/>\nvariables:<br \/>\n  http_proxy: &#034;http:\/\/jump_host:10991&#034;<br \/>\n  NO_PROXY: &#034;*.internal,10.*&#034;<\/p>\n<p>build_image:<br \/>\n  script:<br \/>\n    &#8211; docker build &#8211;network&#061;host -t app .<\/p>\n<h4>6.2 \u591a\u5e73\u53f0\u7ec8\u7aef\u7edf\u4e00\u914d\u7f6e<\/h4>\n<p>Windows\u7cfb\u7edf\u914d\u7f6e\u793a\u4f8b&#xff08;\u9700\u5b89\u88c5Git Bash&#xff09;&#xff1a;<\/p>\n<p># \u6dfb\u52a0\u5230$PROFILE<br \/>\n$env:HTTP_PROXY &#061; &#034;http:\/\/jump_host:10991&#034;<br \/>\n$env:NO_PROXY &#061; &#034;*.corp,10.*&#034;<\/p>\n<h3>7. \u7ef4\u62a4\u4e0e\u6f14\u8fdb\u5efa\u8bae<\/h3>\n<li>\n<p>\u7248\u672c\u5347\u7ea7\u7b56\u7565&#xff1a;<\/p>\n<ul>\n<li>\u6bcf\u5b63\u5ea6\u66f4\u65b0OpenSSH\u5230\u6700\u65b0\u7a33\u5b9a\u7248<\/li>\n<li>\u76d1\u63a7CVE\u5b89\u5168\u516c\u544a<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u81ea\u52a8\u5316\u76d1\u63a7\u65b9\u6848&#xff1a;<\/p>\n<p># \u7b80\u6613\u76d1\u63a7\u811a\u672c<br \/>\nwhile true; do<br \/>\n  if ! curl -m 5 http:\/\/jump_host:10991 &gt;\/dev\/null; then<br \/>\n    send_alert &#034;Proxy tunnel failed&#034;<br \/>\n  fi<br \/>\n  sleep 300<br \/>\ndone<\/p>\n<\/li>\n<li>\n<p>\u6f14\u8fdb\u8def\u7ebf\u56fe&#xff1a;<\/p>\n<ul>\n<li>\u9636\u6bb51&#xff1a;\u57fa\u7840\u4ee3\u7406\u529f\u80fd&#xff08;\u5f53\u524d&#xff09;<\/li>\n<li>\u9636\u6bb52&#xff1a;\u96c6\u6210\u8eab\u4efd\u8ba4\u8bc1&#xff08;6\u4e2a\u6708\u5185&#xff09;<\/li>\n<li>\u9636\u6bb53&#xff1a;\u5168\u6d41\u91cf\u5ba1\u8ba1&#xff08;1\u5e74\u89c4\u5212&#xff09;<\/li>\n<\/ul>\n<\/li>\n","protected":false},"excerpt":{"rendered":"<p>SSH\u96a7\u9053\u5728\u4f01\u4e1a\u7ea7\u53cc\u7f51\u5361\u9694\u79bb\u73af\u5883\u4e2d\u7684\u9ad8\u9636\u5e94\u7528&#xff08;2024 Mac\u5b9e\u6218\u6307\u5357&#xff09;<br \/>\n1. \u4f01\u4e1a\u7ea7\u7f51\u7edc\u9694\u79bb\u573a\u666f\u7684\u6838\u5fc3\u6311\u6218<br \/>\n\u5728\u91d1\u878d\u3001\u533b\u7597\u7b49\u5bf9\u6570\u636e\u5b89\u5168\u8981\u6c42\u4e25\u683c\u7684\u884c\u4e1a&#xff0c;\u751f\u4ea7\u670d\u52a1\u5668\u901a\u5e38\u91c7\u7528\u53cc\u7f51\u5361\u67b6\u6784\u5b9e\u73b0\u5185\u5916\u7f51\u7269\u7406\u9694\u79bb\u3002\u8fd9\u79cd\u8bbe\u8ba1\u867d\u7136\u6709\u6548\u964d\u4f4e\u4e86\u653b\u51fb\u9762&#xff0c;\u5374\u7ed9\u65e5\u5e38\u8fd0\u7ef4\u5e26\u6765\u4e86\u4e09\u5927\u75db\u70b9&#xff1a;<br \/>\n\u5916\u7f51\u4f9d\u8d56\u5de5\u5177\u94fe\u5931\u6548&#xff1a;pip\/conda\u7b49\u5305\u7ba1\u7406\u5de5\u5177\u3001yum\/apt\u7cfb\u7edf\u66f4\u65b0\u6e90\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u7d27\u6025\u6545\u969c\u6392\u67e5\u53d7\u963b&#xff1a;\u65e0\u6cd5\u5feb\u901f\u67e5\u8be2\u516c\u5f00\u6280<\/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":[8332,8334,8333,1475],"topic":[],"class_list":["post-76831","post","type-post","status-publish","format-standard","hentry","category-server","tag-ssh","tag-8334","tag-8333","tag-1475"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09 - \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\/76831.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"SSH\u96a7\u9053\u5728\u4f01\u4e1a\u7ea7\u53cc\u7f51\u5361\u9694\u79bb\u73af\u5883\u4e2d\u7684\u9ad8\u9636\u5e94\u7528&#xff08;2024 Mac\u5b9e\u6218\u6307\u5357&#xff09; 1. \u4f01\u4e1a\u7ea7\u7f51\u7edc\u9694\u79bb\u573a\u666f\u7684\u6838\u5fc3\u6311\u6218 \u5728\u91d1\u878d\u3001\u533b\u7597\u7b49\u5bf9\u6570\u636e\u5b89\u5168\u8981\u6c42\u4e25\u683c\u7684\u884c\u4e1a&#xff0c;\u751f\u4ea7\u670d\u52a1\u5668\u901a\u5e38\u91c7\u7528\u53cc\u7f51\u5361\u67b6\u6784\u5b9e\u73b0\u5185\u5916\u7f51\u7269\u7406\u9694\u79bb\u3002\u8fd9\u79cd\u8bbe\u8ba1\u867d\u7136\u6709\u6548\u964d\u4f4e\u4e86\u653b\u51fb\u9762&#xff0c;\u5374\u7ed9\u65e5\u5e38\u8fd0\u7ef4\u5e26\u6765\u4e86\u4e09\u5927\u75db\u70b9&#xff1a; \u5916\u7f51\u4f9d\u8d56\u5de5\u5177\u94fe\u5931\u6548&#xff1a;pip\/conda\u7b49\u5305\u7ba1\u7406\u5de5\u5177\u3001yum\/apt\u7cfb\u7edf\u66f4\u65b0\u6e90\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u7d27\u6025\u6545\u969c\u6392\u67e5\u53d7\u963b&#xff1a;\u65e0\u6cd5\u5feb\u901f\u67e5\u8be2\u516c\u5f00\u6280\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/76831.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-23T03:50:13+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\/76831.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/76831.html\",\"name\":\"SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-23T03:50:13+00:00\",\"dateModified\":\"2026-02-23T03:50:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/76831.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/76831.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/76831.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09\"}]},{\"@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":"SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09 - \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\/76831.html","og_locale":"zh_CN","og_type":"article","og_title":"SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"SSH\u96a7\u9053\u5728\u4f01\u4e1a\u7ea7\u53cc\u7f51\u5361\u9694\u79bb\u73af\u5883\u4e2d\u7684\u9ad8\u9636\u5e94\u7528&#xff08;2024 Mac\u5b9e\u6218\u6307\u5357&#xff09; 1. \u4f01\u4e1a\u7ea7\u7f51\u7edc\u9694\u79bb\u573a\u666f\u7684\u6838\u5fc3\u6311\u6218 \u5728\u91d1\u878d\u3001\u533b\u7597\u7b49\u5bf9\u6570\u636e\u5b89\u5168\u8981\u6c42\u4e25\u683c\u7684\u884c\u4e1a&#xff0c;\u751f\u4ea7\u670d\u52a1\u5668\u901a\u5e38\u91c7\u7528\u53cc\u7f51\u5361\u67b6\u6784\u5b9e\u73b0\u5185\u5916\u7f51\u7269\u7406\u9694\u79bb\u3002\u8fd9\u79cd\u8bbe\u8ba1\u867d\u7136\u6709\u6548\u964d\u4f4e\u4e86\u653b\u51fb\u9762&#xff0c;\u5374\u7ed9\u65e5\u5e38\u8fd0\u7ef4\u5e26\u6765\u4e86\u4e09\u5927\u75db\u70b9&#xff1a; \u5916\u7f51\u4f9d\u8d56\u5de5\u5177\u94fe\u5931\u6548&#xff1a;pip\/conda\u7b49\u5305\u7ba1\u7406\u5de5\u5177\u3001yum\/apt\u7cfb\u7edf\u66f4\u65b0\u6e90\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u7d27\u6025\u6545\u969c\u6392\u67e5\u53d7\u963b&#xff1a;\u65e0\u6cd5\u5feb\u901f\u67e5\u8be2\u516c\u5f00\u6280","og_url":"https:\/\/www.wsisp.com\/helps\/76831.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-23T03:50:13+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\/76831.html","url":"https:\/\/www.wsisp.com\/helps\/76831.html","name":"SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-23T03:50:13+00:00","dateModified":"2026-02-23T03:50:13+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/76831.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/76831.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/76831.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"SSH\u96a7\u9053\u8fdb\u9636\u73a9\u6cd5\uff1a\u7528Mac\u5f53\u8df3\u677f\u673a\u5b9e\u73b0\u670d\u52a1\u5668\u53cc\u7f51\u5361\u9694\u79bb\u8bbf\u95ee\uff082024\u5b9e\u6d4b\u7248\uff09"}]},{"@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\/76831","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=76831"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/76831\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=76831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=76831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=76831"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=76831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}