<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.simcentric.com/tc/"},{"@type":"ListItem","position":2,"name":"如何在伺服器上設定多個 SSH 金鑰","item":"https://www.simcentric.com/tc/japan-dedicated-server-tc/how-to-configure-multiple-ssh-keys-on-a-server/"}]}</script> {"id":34529,"date":"2026-09-04T11:44:34","date_gmt":"2026-09-04T03:44:34","guid":{"rendered":"https:\/\/www.simcentric.com\/uncategorized-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/"},"modified":"2026-09-04T11:58:38","modified_gmt":"2026-09-04T03:58:38","slug":"how-to-configure-multiple-ssh-keys-on-a-server","status":"publish","type":"post","link":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/","title":{"rendered":"\u5982\u4f55\u5728\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470"},"content":{"rendered":"<p>\u4f60\u525b\u5750\u4e0b\uff0c\u6e96\u5099\u628a\u7a0b\u5f0f\u78bc\u63a8\u9001\u5230\u5de5\u4f5c\u7528\u7684 <a href=\"https:\/\/www.simcentric.com\/tc\/products\/dedicated-server-jp\/\" target=\"_blank\" rel=\"noopener\">\u7b46\u8a18\u578b\u96fb\u8166<\/a>\u4e0a\u7ba1\u7406\u4e0d\u540c\u7684 Git \u5e33\u865f\u6642\uff0c\u9019\u7a2e\u632b\u6298\u611f\u975e\u5e38\u5e38\u898b\u3002<\/p>\n<p>\u4f60\u6216\u8a31\u6703\u624b\u52d5\u5207\u63db\u91d1\u9470\uff0c\u6216\u8005\u4e7e\u8106\u4f7f\u7528\u4e0d\u540c\u7684\u6a5f\u5668\u3002\u9019\u4e9b\u6b0a\u5b9c\u4e4b\u8a08\u65e2\u6d6a\u8cbb\u6642\u9593\uff0c\u4e5f\u5bb9\u6613\u51fa\u932f\u3002\u5176\u5be6\u6709\u66f4\u597d\u7684\u65b9\u6848\uff1a\u4f60\u53ef\u4ee5\u628a\u591a\u500b SSH \u91d1\u9470\u8a2d\u5b9a\u70ba\u5354\u540c\u904b\u4f5c\u3002\u70ba\u6bcf\u500b\u670d\u52d9\u7522\u751f\u4e00\u628a\u7368\u7acb\u7684\u65b0 SSH \u91d1\u9470\uff1b\u7136\u5f8c\u5efa\u7acb\u4e00\u500b\u7d71\u4e00\u7684\u8a2d\u5b9a\u6a94\u3002\u9019\u500b\u6a94\u6848\u6703\u544a\u8a34\u7cfb\u7d71\uff0c\u91dd\u5c0d\u4e0d\u540c\u4e3b\u6a5f\u61c9\u8a72\u4f7f\u7528\u54ea\u4e00\u628a\u91d1\u9470\u3002\u5982\u6b64\u8a2d\u5b9a\u4e4b\u5f8c\uff0c\u5c31\u7121\u9700\u518d\u624b\u52d5\u5207\u63db\u3002\u4f60\u7684\u6240\u6709\u9060\u7aef\u9023\u7dda\u90fd\u5c07\u64c1\u6709\u4e00\u5957\u9577\u671f\u7a69\u5b9a\u3001\u66f4\u52a0\u9806\u66a2\u7684\u5de5\u4f5c\u6d41\u7a0b\u3002<\/p>\n<h2><strong>\u5982\u4f55\u5728\u4f60\u7684\u7cfb\u7d71\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470<\/strong><\/h2>\n<p>\u6240\u6709\u9a57\u8b49\u6a94\u6848\u90fd\u61c9\u5b58\u653e\u5728\u4f60\u672c\u6a5f\u7684 <code>~\/.ssh<\/code> \u76ee\u9304\u4e2d\u3002\u9019\u500b\u76ee\u9304\u7528\u4f86\u5132\u5b58\u79c1\u9470\u8207\u516c\u9470\u6a94\u6848\u914d\u5c0d\u3002\u5c07\u6240\u6709\u5167\u5bb9\u96c6\u4e2d\u7ba1\u7406\uff0c\u4e0d\u50c5\u66f4\u65b9\u4fbf\uff0c\u4e5f\u80fd\u78ba\u4fdd SSH \u7528\u6236\u7aef\u81ea\u52d5\u627e\u5230\u6b63\u78ba\u7684\u6191\u8b49\u3002<\/p>\n<h3>\u70ba\u6bcf\u500b\u670d\u52d9\u7522\u751f\u7368\u7acb\u91d1\u9470<\/h3>\n<p>\u9996\u5148\uff0c\u70ba\u4f60\u4f7f\u7528\u7684\u6bcf\u500b\u9060\u7aef\u670d\u52d9\u5efa\u7acb\u4e00\u7d44\u7368\u7acb\u7684\u91d1\u9470\u5c0d\u3002\u4e0b\u9762\u9019\u689d\u6307\u4ee4\u6703\u7522\u751f\u4e00\u500b\u5e36\u6709\u81ea\u8a02\u6a94\u540d\u7684\u65b0 SSH \u91d1\u9470\uff1a<\/p>\n<pre><code>ssh-keygen -t ed25519 -C \"work@email.com\" -f ~\/.ssh\/gitlab_work<\/code><\/pre>\n<p><code>-f<\/code> \u53c3\u6578\u7528\u65bc\u6307\u5b9a\u8f38\u51fa\u6a94\u540d\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u5b83\uff0c\u7cfb\u7d71\u6703\u9810\u8a2d\u7522\u751f\u5230 <code>id_ed25519<\/code>\uff0c\u9019\u53ef\u80fd\u6703\u8986\u84cb\u4f60\u65e2\u6709\u7684\u91d1\u9470\u3002\u5efa\u8b70\u4f7f\u7528\u50cf <code>github_personal<\/code>\u3001<code>gitlab_work<\/code> \u9019\u6a23\u5177\u6709\u63cf\u8ff0\u6027\u7684\u540d\u7a31\uff0c\u65b9\u4fbf\u4e00\u773c\u8fa8\u8b58\u6bcf\u628a\u91d1\u9470\u7684\u7528\u9014\u3002<\/p>\n<p>\u5c0d\u65bc\u65b0\u91d1\u9470\u800c\u8a00\uff0cEd25519 \u662f\u5efa\u8b70\u4f7f\u7528\u7684\u6f14\u7b97\u6cd5\u3002\u8207 RSA \u76f8\u6bd4\uff0c\u5b83\u901a\u5e38\u5177\u5099\u66f4\u597d\u7684\u5b89\u5168\u6027\u3001\u66f4\u5feb\u7684\u6548\u80fd\u4ee5\u53ca\u66f4\u5c0f\u7684\u91d1\u9470\u9ad4\u7a4d\u3002\u5927\u591a\u6578\u73fe\u4ee3 Linux \u767c\u884c\u7248\u8207 OpenSSH 6.5 \u53ca\u4ee5\u4e0a\u7248\u672c\u90fd\u5df2\u5b8c\u6574\u652f\u63f4\u5b83\u3002\u4e0d\u904e\uff0c\u67d0\u4e9b\u8f03\u820a\u7684\u7cfb\u7d71\u6216\u7279\u5b9a\u96f2\u7aef\u670d\u52d9\u4f9b\u61c9\u5546\u53ef\u80fd\u4ecd\u8981\u6c42\u4f7f\u7528 RSA\u3002\u5982\u679c\u4f60\u51fa\u65bc\u76f8\u5bb9\u6027\u9700\u6c42\u800c\u9078\u64c7 RSA\uff0c\u8acb\u81f3\u5c11\u4f7f\u7528 3072 \u4f4d\u5143\uff0c\u6700\u597d\u662f 4096 \u4f4d\u5143\u3002<\/p>\n<p>\u7576\u6307\u4ee4\u63d0\u793a\u4f60\u8f38\u5165 passphrase \u6642\uff0c\u8acb\u52d9\u5fc5\u8a2d\u5b9a\u4e00\u500b\u3002\u9019\u5c64\u984d\u5916\u4fdd\u8b77\u53ef\u5728\u4ed6\u4eba\u53d6\u5f97\u4f60\u6a5f\u5668\u5b58\u53d6\u6b0a\u9650\u6642\uff0c\u9032\u4e00\u6b65\u4fdd\u8b77\u4f60\u7684\u79c1\u9470\u3002\u9664\u975e\u4f60\u7a0d\u5f8c\u8a2d\u5b9a\u4e86 agent\uff0c\u5426\u5247\u6bcf\u6b21\u9023\u7dda\u6642\u90fd\u9700\u8981\u8f38\u5165\u9019\u500b passphrase\u3002<\/p>\n<h3>\u5c07\u516c\u9470\u52a0\u5165\u9060\u7aef\u4e3b\u6a5f<\/h3>\n<p>\u5728\u7522\u751f\u6bcf\u7d44\u91d1\u9470\u5f8c\uff0c\u4f60\u9084\u5fc5\u9808\u628a\u5c0d\u61c9\u7684\u516c\u9470\u8a3b\u518a\u5230\u76f8\u95dc\u670d\u52d9\u4e2d\u3002\u5c0d\u65bc\u4f60\u7684\u5de5\u4f5c GitHub \u5e33\u865f\uff0c\u53ef\u4ee5\u9032\u5165 Settings \u2192 SSH keys\uff0c\u7136\u5f8c\u8cbc\u4e0a\u5c0d\u61c9 <code>.pub<\/code> \u6a94\u6848\u4e2d\u7684\u5167\u5bb9\u3002\u5c0d\u65bc\u8a17\u7ba1\u5728\u516c\u53f8\u4f3a\u670d\u5668\u4e0a\u7684\u5de5\u4f5c\u5c08\u6848\u5132\u5b58\u5eab\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u5c07\u8a72\u516c\u9470\u9644\u52a0\u5230\u76ee\u6a19\u6a5f\u5668\u7684 <code>~\/.ssh\/authorized_keys<\/code> \u6a94\u6848\u4e2d\u3002<\/p>\n<p><code>ssh-copy-id<\/code> \u5de5\u5177\u53ef\u4ee5\u5927\u5e45\u7c21\u5316\u9019\u500b\u6d41\u7a0b\u3002\u57f7\u884c <code>ssh-copy-id -i ~\/.ssh\/gitlab_work.pub user@server.com<\/code>\uff0c\u5373\u53ef\u5728\u4e0d\u8986\u84cb\u73fe\u6709\u9805\u76ee\u7684\u524d\u63d0\u4e0b\uff0c\u628a\u516c\u9470\u9644\u52a0\u5230\u9060\u7aef\u4e3b\u6a5f\u4e2d\u3002\u7576\u4f60\u9700\u8981\u5728\u591a\u53f0\u6a5f\u5668\u4e4b\u9593\u7ba1\u7406\u591a\u628a\u91d1\u9470\u6642\uff0c\u9019\u500b\u6307\u4ee4\u6703\u975e\u5e38\u9ad8\u6548\u3002<\/p>\n<p>\u5728\u958b\u59cb\u8a2d\u5b9a\u7d71\u4e00\u7684 config \u6a94\u6848\u4e4b\u524d\uff0c\u5efa\u8b70\u5148\u4f7f\u7528 <code>-i<\/code> \u9078\u9805\u5206\u5225\u6e2c\u8a66\u6bcf\u4e00\u628a\u91d1\u9470\u3002\u53ea\u8981\u770b\u5230\u6210\u529f\u63d0\u793a\uff0c\u5c31\u8868\u793a\u8a72\u91d1\u9470\u672c\u8eab\u53ef\u6b63\u5e38\u4f7f\u7528\u3002\u9019\u4e00\u6b65\u80fd\u5728\u4f60\u5efa\u7acb\u5b8c\u6574\u8a2d\u5b9a\u524d\uff0c\u63d0\u524d\u627e\u51fa\u554f\u984c\u3002<\/p>\n<h2><strong>\u4f7f\u7528 Config \u6a94\u6848\u7ba1\u7406\u591a\u500b SSH \u91d1\u9470<\/strong><\/h2>\n<p><code>~\/.ssh\/config<\/code> \u6a94\u6848\u5c31\u662f\u6574\u5957\u8a2d\u5b9a\u7684\u6307\u63ee\u4e2d\u5fc3\u3002\u9019\u500b\u7d14\u6587\u5b57\u6a94\u6703\u660e\u78ba\u544a\u8a34\u7cfb\u7d71\uff1a\u9023\u7dda\u4e0d\u540c\u9060\u7aef\u4e3b\u6a5f\u6642\uff0c\u61c9\u8a72\u51fa\u793a\u54ea\u4e00\u628a\u91d1\u9470\u3002\u4f60\u53ef\u4ee5\u5efa\u7acb\u8207\u4e3b\u6a5f\u540d\u7a31\u5339\u914d\u7684\u898f\u5247\uff0c\u4e26\u70ba\u9019\u4e9b\u898f\u5247\u6307\u5b9a\u5c0d\u61c9\u7684\u8eab\u4efd\u6a94\u6848\u3002\u5982\u6b64\u4e00\u4f86\uff0c\u5c31\u4e0d\u518d\u9700\u8981\u731c\u6e2c\u6216\u624b\u52d5\u9078\u9470\u5319\u3002<\/p>\n<h3>\u8a2d\u5b9a\u4e3b\u6a5f\u5225\u540d\u8207 IdentityFile<\/h3>\n<p>\u4f7f\u7528\u4efb\u610f\u6587\u5b57\u7de8\u8f2f\u5668\u958b\u555f config \u6a94\u6848\u3002\u4f60\u9700\u8981\u5efa\u7acb\u82e5\u5e72\u8a2d\u5b9a\u5340\u584a\u4f86\u5b9a\u7fa9\u9023\u7dda\u53c3\u6578\u3002\u6bcf\u500b\u8a2d\u5b9a\u5340\u584a\u90fd\u4ee5\u4e00\u884c <code>Host<\/code> \u958b\u982d\uff0c\u7528\u4f86\u5efa\u7acb\u4f60\u9023\u7dda\u6642\u8f38\u5165\u7684\u5225\u540d\u3002<code>HostName<\/code> \u6307\u5b9a\u5be6\u969b\u7db2\u57df\u540d\u7a31\u3002<code>User<\/code> \u6307\u5b9a\u767b\u5165\u4f7f\u7528\u8005\u540d\u7a31\u3002<code>IdentityFile<\/code> \u5247\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u79c1\u9470\u8def\u5f91\u3002<\/p>\n<p>\u5047\u8a2d\u4f60\u540c\u6642\u7ba1\u7406\u5de5\u4f5c GitHub \u5e33\u865f\u8207\u500b\u4eba GitHub \u5e33\u865f\uff0c\u4f60\u7684 config \u6a94\u6848\u53ef\u4ee5\u5beb\u6210\u9019\u6a23\uff1a<\/p>\n<pre><code># --- \u7528\u65bc\u5de5\u4f5c GitHub ---\r\nHost github.com-work\r\nHostName github.com\r\nUser git\r\nIdentityFile ~\/.ssh\/github_work\r\nIdentitiesOnly yes\r\n\r\n# --- \u7528\u65bc\u500b\u4eba GitHub ---\r\nHost github.com-personal\r\nHostName github.com\r\nUser git\r\nIdentityFile ~\/.ssh\/github_personal\r\nIdentitiesOnly yes<\/code><\/pre>\n<p><code>IdentitiesOnly yes<\/code> \u9019\u500b\u6307\u4ee4\u975e\u5e38\u95dc\u9375\u3002\u7576\u4f60\u7684 agent \u4e2d\u8f09\u5165\u4e86\u591a\u628a SSH \u91d1\u9470\u6642\uff0c\u5efa\u7acb\u9023\u7dda\u6642\u7cfb\u7d71\u53ef\u80fd\u6703\u4f9d\u5e8f\u5617\u8a66\u591a\u628a\u91d1\u9470\uff0c\u76f4\u5230\u627e\u5230\u6b63\u78ba\u7684\u4e00\u628a\u3002\u4f3a\u670d\u5668\u6703\u62d2\u7d55\u932f\u8aa4\u7684\u91d1\u9470\uff0c\u800c\u591a\u6b21\u5931\u6557\u751a\u81f3\u53ef\u80fd\u89f8\u767c\u5b89\u5168\u9650\u5236\u3002\u9019\u500b\u6307\u4ee4\u6703\u78ba\u4fdd\u7cfb\u7d71\u53ea\u63d0\u4f9b\u76ee\u524d\u8a2d\u5b9a\u5340\u584a\u4e2d\u6307\u5b9a\u7684\u90a3\u4e00\u628a\u91d1\u9470\uff0c\u5f9e\u800c\u907f\u514d\u8aa4\u9001\u91d1\u9470\u8207\u9a57\u8b49\u5931\u6557\u3002<\/p>\n<p>\u4f60\u4e5f\u53ef\u4ee5\u5728\u540c\u4e00\u500b\u4e3b\u6a5f\u8a2d\u5b9a\u4e2d\u5beb\u591a\u500b <code>IdentityFile<\/code>\u3002SSH \u6703\u4f9d\u5e8f\u5617\u8a66\u9019\u4e9b\u91d1\u9470\uff0c\u76f4\u5230\u4f3a\u670d\u5668\u63a5\u53d7\u5176\u4e2d\u67d0\u4e00\u628a\u3002\u9019\u7a2e\u505a\u6cd5\u5728\u4f60\u8f2a\u66ff\u91d1\u9470\u6216\u900f\u904e\u591a\u7a2e\u6191\u8b49\u4fdd\u7559\u5b58\u53d6\u80fd\u529b\u6642\u975e\u5e38\u6709\u5e6b\u52a9\u3002<\/p>\n<p>\u9084\u6709\u4e00\u9ede\u9700\u8981\u6ce8\u610f\uff1a\u907f\u514d\u5728\u8a2d\u5b9a\u6a94\u5f8c\u9762\u53c8\u91cd\u65b0\u8986\u84cb\u524d\u9762\u5df2\u7d93\u4fee\u6539\u904e\u7684\u4e3b\u6a5f\u898f\u5247\u3002\u4f8b\u5982\u4f60\u5148\u5efa\u7acb\u4e86\u4e00\u500b <code>Host github.com-work<\/code> \u5225\u540d\u4e26\u4fee\u6539\u4e86 hostname\uff0c\u5f8c\u9762\u53c8\u65b0\u589e\u4e86\u4e00\u500b\u91dd\u5c0d <code>Host github.com<\/code> \u7684\u8a2d\u5b9a\u4e26\u6307\u5b9a\u4e86\u4e0d\u540c\u7684\u91d1\u9470\uff0cagent \u53ef\u80fd\u6703\u8986\u84cb\u4f60\u524d\u9762\u7684\u898f\u5247\u3002\u5efa\u8b70\u8b93\u5225\u540d\u7d44\u7e54\u6e05\u695a\u3001\u898f\u5247\u8db3\u5920\u5177\u9ad4\u3002<\/p>\n<h3>\u4f7f\u7528\u842c\u7528\u5b57\u5143\u8a2d\u5b9a\u9810\u8a2d\u7d44\u614b<\/h3>\n<p>\u7576\u4f60\u9700\u8981\u7ba1\u7406\u5f88\u591a\u4f3a\u670d\u5668\u6642\uff0c\u842c\u7528\u5b57\u5143\u53ef\u4ee5\u5927\u5e45\u7c21\u5316 SSH \u8a2d\u5b9a\u3002\u661f\u865f\uff08<code>*<\/code>\uff09\u53ef\u5339\u914d\u96f6\u500b\u6216\u591a\u500b\u5b57\u5143\uff0c\u554f\u865f\uff08<code>?<\/code>\uff09\u5247\u5339\u914d\u525b\u597d\u4e00\u500b\u5b57\u5143\u3002\u85c9\u52a9\u9019\u4e9b\u6a21\u5f0f\uff0c\u4f60\u53ef\u4ee5\u70ba\u6574\u7d44\u4e3b\u6a5f\u5957\u7528\u7d71\u4e00\u8a2d\u5b9a\uff0c\u800c\u4e0d\u5fc5\u70ba\u6bcf\u53f0\u6a5f\u5668\u90fd\u53e6\u5916\u64b0\u5beb\u4e00\u500b\u8a2d\u5b9a\u5340\u584a\u3002<\/p>\n<p><strong>\u6a21\u5f0f\u8a9e\u6cd5<\/strong>\uff1a\u4e00\u500b\u6a21\u5f0f\u7531\u96f6\u500b\u6216\u591a\u500b\u975e\u7a7a\u767d\u5b57\u5143\u3001<code>*<\/code>\uff08\u5339\u914d\u96f6\u500b\u6216\u591a\u500b\u5b57\u5143\u7684\u842c\u7528\u5b57\u5143\uff09\u6216 <code>?<\/code>\uff08\u5339\u914d\u525b\u597d\u4e00\u500b\u5b57\u5143\u7684\u842c\u7528\u5b57\u5143\uff09\u7d44\u6210\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u70ba\u67d0\u500b\u7db2\u57df\u4e0b\u7684\u6240\u6709\u4e3b\u6a5f\u8a2d\u5b9a\u7d71\u4e00\u53c3\u6578\uff1a<\/p>\n<pre><code>Host *.company.com\r\nUser deploy\r\nIdentityFile ~\/.ssh\/company_deploy\r\nIdentitiesOnly yes<\/code><\/pre>\n<p>\u9019\u689d\u898f\u5247\u6703\u5957\u7528\u5230 staging.company.com\u3001production.company.com \u4ee5\u53ca\u5176\u4ed6\u4efb\u4f55\u5b50\u7db2\u57df\u3002\u4f60\u4e5f\u53ef\u4ee5\u5339\u914d IP \u7bc4\u570d\u3002\u4f8b\u5982\uff0c<code>Host 192.168.0.?<\/code> \u9019\u500b\u6a21\u5f0f\u6703\u5339\u914d 192.168.0.0 \u5230 192.168.0.9 \u7bc4\u570d\u5167\u7684\u4efb\u610f\u4e3b\u6a5f\u3002<\/p>\n<p>\u842c\u7528\u5b57\u5143\u4e5f\u652f\u63f4\u7e7c\u627f\u5f0f\u5339\u914d\u3002\u6bd4\u5982\u4e3b\u6a5f\u540d\u7a31 <code>acmereplica<\/code> \u53ef\u80fd\u6703\u5148\u5339\u914d\u4e00\u500b\u901a\u7528\u7684 <code>Host acme*<\/code> \u8a2d\u5b9a\u5340\u584a\u4ee5\u53d6\u5f97\u4f7f\u7528\u8005\u8a2d\u5b9a\uff0c\u518d\u5339\u914d\u66f4\u5177\u9ad4\u7684 <code>Host acmereplica*<\/code> \u8a2d\u5b9a\u5340\u584a\u4ee5\u53d6\u5f97\u5176 hostname\u3002SSH \u6703\u6309\u7167\u7531\u4e0a\u800c\u4e0b\u7684\u9806\u5e8f\u8b80\u53d6\u8a2d\u5b9a\uff0c\u4e26\u5c0d\u6bcf\u500b\u53c3\u6578\u63a1\u7528\u7b2c\u4e00\u500b\u5339\u914d\u5230\u7684\u503c\u3002<\/p>\n<p>\u9019\u7a2e\u65b9\u5f0f\u7684\u64f4\u5145\u6027\u975e\u5e38\u597d\u3002\u65b0\u589e\u4e00\u53f0\u4f3a\u670d\u5668\u6642\uff0c\u85c9\u52a9\u842c\u7528\u5b57\u5143\u5f80\u5f80\u53ea\u9700\u8981\u88dc\u4e0a\u5169\u884c\u8a2d\u5b9a\u5373\u53ef\u3002\u4f60\u7121\u9808\u91cd\u8907\u64b0\u5beb\u5927\u91cf\u5171\u7528\u53c3\u6578\uff0c\u842c\u7528\u6a21\u5f0f\u6703\u66ff\u4f60\u8655\u7406\u5176\u9918\u5de5\u4f5c\u3002<\/p>\n<p><code>Host *<\/code> \u8a2d\u5b9a\u5340\u584a\u53ef\u4ee5\u4f5c\u70ba\u4f60\u7684\u9810\u8a2d\u7d44\u614b\u3002\u8acb\u5c07\u5b83\u653e\u5728\u6a94\u6848\u5e95\u90e8\u3002\u6240\u6709\u6c92\u6709\u5339\u914d\u5230\u66f4\u5177\u9ad4\u898f\u5247\u7684\u4e3b\u6a5f\uff0c\u90fd\u6703\u7e7c\u627f\u9019\u88e1\u7684\u8a2d\u5b9a\u3002\u4f8b\u5982\u4f60\u53ef\u4ee5\u5728\u9019\u88e1\u7d71\u4e00\u8a2d\u5b9a <code>AddKeysToAgent yes<\/code>\uff0c\u4ee5\u81ea\u52d5\u8f09\u5165\u91d1\u9470\u3002<\/p>\n<p>\u4f60\u7684 SSH config \u6a94\u6848\u6703\u5fb9\u5e95\u6539\u8b8a\u4f60\u7ba1\u7406\u9060\u7aef\u9023\u7dda\u7684\u65b9\u5f0f\u3002\u4f60\u53ea\u9700\u8981\u628a\u591a\u500b SSH \u91d1\u9470\u8a2d\u5b9a\u4e00\u6b21\uff0c\u4e4b\u5f8c\u5c31\u53ef\u4ee5\u4e0d\u518d\u64cd\u5fc3\u624b\u52d5\u9078\u9470\u5319\u7684\u554f\u984c\u3002\u7cfb\u7d71\u6703\u81ea\u52d5\u628a\u6bcf\u6b21\u9023\u7dda\u8def\u7531\u5230\u6b63\u78ba\u7684\u8a2d\u5b9a\u3002\u5efa\u7acb\u597d\u6a94\u6848\u5f8c\uff0c\u8acb\u8a18\u5f97\u6e2c\u8a66\uff0c\u78ba\u8a8d\u6bcf\u500b\u4e3b\u6a5f\u90fd\u4f7f\u7528\u4e86\u9810\u671f\u7684\u91d1\u9470\u3002<\/p>\n<h2><strong>\u5c07\u591a\u7d44 SSH \u91d1\u9470\u52a0\u5165 Agent<\/strong><\/h2>\n<p>SSH agent \u662f\u4e00\u500b\u80cc\u666f\u7a0b\u5f0f\uff0c\u7528\u4f86\u5728\u8a18\u61b6\u9ad4\u4e2d\u4fdd\u5b58\u5df2\u89e3\u5bc6\u7684\u79c1\u9470\u3002\u5b83\u53ef\u4ee5\u8b93\u4f60\u4e0d\u5fc5\u5728\u6bcf\u6b21\u9023\u7dda\u9060\u7aef\u4e3b\u6a5f\u6642\u90fd\u91cd\u8907\u8f38\u5165 passphrase\u3002\u7576\u4f60\u540c\u6642\u4f7f\u7528\u591a\u7d44 SSH \u91d1\u9470\u6642\uff0cagent \u5e7e\u4e4e\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\u3002\u5b83\u53ef\u4ee5\u7d71\u4e00\u7ba1\u7406\u6240\u6709\u91d1\u9470\uff0c\u4e26\u5728\u9a57\u8b49\u6642\u81ea\u52d5\u63d0\u4f9b\u6b63\u78ba\u7684\u90a3\u4e00\u628a\u3002<\/p>\n<h3>\u4f7f\u7528 ssh-add \u5be6\u73fe\u81ea\u52d5\u9a57\u8b49<\/h3>\n<p>\u9996\u5148\uff0c\u5728\u7d42\u7aef\u6a5f\u5de5\u4f5c\u968e\u6bb5\u4e2d\u57f7\u884c <code>eval \"$(ssh-agent -s)\"<\/code> \u4f86\u555f\u52d5 agent\u3002\u9019\u500b\u6307\u4ee4\u6703\u555f\u52d5 agent\uff0c\u4e26\u8a2d\u5b9a\u5b83\u6240\u9700\u7684\u74b0\u5883\u8b8a\u6578\u3002\u63a5\u8457\uff0c\u4f7f\u7528 <code>ssh-add<\/code> \u6307\u4ee4\u628a\u4f60\u7684\u79c1\u9470\u52a0\u5165\u5176\u4e2d\u3002<\/p>\n<p>agent \u6703\u70ba\u6bcf\u628a\u91d1\u9470\u63d0\u793a\u4f60\u8f38\u5165\u4e00\u6b21 passphrase\u3002\u4e4b\u5f8c\uff0c\u5b83\u5c31\u6703\u628a\u89e3\u5bc6\u5f8c\u7684\u79c1\u9470\u4fdd\u5b58\u5728\u8a18\u61b6\u9ad4\u4e2d\u3002\u4f60\u53ef\u4ee5\u57f7\u884c <code>ssh-add -l<\/code> \u4f86\u78ba\u8a8d\u76ee\u524d\u5df2\u8f09\u5165\u54ea\u4e9b\u91d1\u9470\u3002\u9019\u500b\u6307\u4ee4\u6703\u5217\u51fa agent \u76ee\u524d\u6301\u6709\u7684\u6240\u6709\u6307\u7d0b\u3002<\/p>\n<p><strong>\u95dc\u65bc SSH agent forwarding \u7684\u5b89\u5168\u5efa\u8b70\uff1a<\/strong>Agent forwarding \u53ef\u4ee5\u8b93\u4f60\u900f\u904e\u5821\u58d8\u6a5f\u4f7f\u7528\u672c\u6a5f\u91d1\u9470\u3002\u4f46\u662f\uff0c\u5982\u679c\u8f49\u767c\u76ee\u6a19\u4e3b\u6a5f\u88ab\u653b\u7834\uff0c\u653b\u64ca\u8005\u5c31\u53ef\u80fd\u52ab\u6301\u4f60\u7684\u91d1\u9470\u3002\u4f60\u7ba1\u7406\u7684\u91d1\u9470\u8d8a\u591a\uff0c\u98a8\u96aa\u4e5f\u8d8a\u5927\uff0c\u56e0\u70ba\u88ab\u653b\u7834\u7684\u76ee\u6a19\u53ef\u80fd\u66b4\u9732\u4f60\u6240\u6709\u88ab\u8f49\u767c\u7684\u91d1\u9470\u3002\u56e0\u6b64\uff0c\u53ea\u6709\u5728\u5b8c\u5168\u4fe1\u4efb\u76ee\u6a19\u4f3a\u670d\u5668\u6642\u624d\u61c9\u555f\u7528 agent forwarding\u3002\u66f4\u5b89\u5168\u7684\u66ff\u4ee3\u65b9\u6848\u662f\u4f7f\u7528 <code>ProxyJump<\/code>\uff08<code>-J<\/code>\uff09\uff0c\u56e0\u70ba\u5b83\u4e0d\u9700\u8981\u8f49\u767c\u91d1\u9470\u672c\u8eab\uff1a<code>ssh -J bastion.example.com user_x@internal.example.com<\/code>\u3002<\/p>\n<h3>\u8b93\u91d1\u9470\u5728\u91cd\u65b0\u958b\u6a5f\u5f8c\u6301\u7e8c\u53ef\u7528<\/h3>\n<p>agent \u53ea\u6703\u628a\u91d1\u9470\u4fdd\u5b58\u5728\u8a18\u61b6\u9ad4\u4e2d\u3002\u7576\u4f60\u91cd\u65b0\u555f\u52d5\u6a5f\u5668\u5f8c\uff0cagent \u4e2d\u5df2\u8f09\u5165\u7684\u91d1\u9470\u6703\u88ab\u6e05\u7a7a\u3002\u9664\u975e\u4f60\u984d\u5916\u8a2d\u5b9a\u6301\u4e45\u5316\u6a5f\u5236\uff0c\u5426\u5247\u6bcf\u6b21\u958b\u6a5f\u5f8c\u90fd\u9700\u8981\u624b\u52d5\u91cd\u65b0\u52a0\u5165\u3002<\/p>\n<p>\u5728 macOS \u4e0a\uff0c\u4f60\u53ef\u4ee5\u5c07 passphrase \u5132\u5b58\u5728 Keychain \u4e2d\u3002\u57f7\u884c <code>ssh-add --apple-use-keychain ~\/.ssh\/github_personal<\/code>\uff0c\u5373\u53ef\u5728\u52a0\u5165\u91d1\u9470\u7684\u540c\u6642\u5b89\u5168\u5132\u5b58\u5176 passphrase\u3002\u7136\u5f8c\uff0c\u5728\u4f60\u7684 <code>~\/.ssh\/config<\/code> \u6a94\u6848\u4e2d <code>Host *<\/code> \u9019\u985e\u901a\u7528\u8a2d\u5b9a\u5340\u584a\u4e0b\u52a0\u5165\u4ee5\u4e0b\u5167\u5bb9\uff1a<\/p>\n<pre><code>UseKeychain yes\r\nAddKeysToAgent yes<\/code><\/pre>\n<p><code>UseKeychain yes<\/code> \u6307\u4ee4\u6703\u544a\u8a34 SSH \u81ea\u52d5\u5f9e Keychain \u4e2d\u8b80\u53d6 passphrase\u3002\u9019\u6a23\u5728\u6a5f\u5668\u91cd\u65b0\u555f\u52d5\u5f8c\uff0cagent \u4e5f\u80fd\u81ea\u52d5\u8f09\u5165\u4f60\u7684\u91d1\u9470\uff0c\u800c\u7121\u9700\u518d\u6b21\u624b\u52d5\u8f38\u5165\u3002<\/p>\n<p>\u5728 Linux \u4e0a\uff0c\u505a\u6cd5\u6703\u7565\u6709\u4e0d\u540c\u3002\u6709\u4e9b\u767c\u884c\u7248\u652f\u63f4 <code>ssh-add -K<\/code>\uff0c\u4f46\u9019\u500b\u53c3\u6578\u4e26\u4e0d\u901a\u7528\u3002\u66f4\u53ef\u9760\u7684\u65b9\u5f0f\u662f\u4f7f\u7528\u50cf <code>gnome-keyring<\/code> \u6216 <code>KWallet<\/code> \u9019\u6a23\u7684\u91d1\u9470\u5708\u7ba1\u7406\u5de5\u5177\u3002\u5b83\u5011\u53ef\u4ee5\u8207\u4f60\u7684\u684c\u9762\u74b0\u5883\u6574\u5408\uff0c\u4e26\u5728\u4f60\u767b\u5165\u6642\u81ea\u52d5\u89e3\u9396\u91d1\u9470\u3002\u6216\u8005\uff0c\u4f60\u4e5f\u53ef\u4ee5\u5efa\u7acb\u4e00\u500b\u958b\u6a5f\u555f\u52d5\u8173\u672c\uff0c\u5728\u6bcf\u6b21\u7cfb\u7d71\u555f\u52d5\u5f8c\u81ea\u52d5\u8f09\u5165\u6240\u9700\u91d1\u9470\u3002<\/p>\n<p>ssh-agent \u80fd\u986f\u8457\u6539\u5584\u4f60\u7684\u5de5\u4f5c\u6d41\u7a0b\u3002\u4f60\u53ea\u9700\u628a\u91d1\u9470\u8a2d\u5b9a\u4e00\u6b21\uff0c\u5f8c\u7e8c\u9a57\u8b49\u904e\u7a0b\u5c31\u6703\u5728\u80cc\u666f\u6084\u7136\u5b8c\u6210\u3002\u5982\u6b64\u4e00\u4f86\uff0c\u5728\u591a\u500b Git \u670d\u52d9\u4e4b\u9593\u4f86\u56de\u5207\u63db\u6642\uff0c\u4f60\u6703\u7bc0\u7701\u5927\u91cf\u6642\u9593\uff0c\u4e5f\u80fd\u6e1b\u5c11\u4e0d\u5fc5\u8981\u7684\u632b\u6298\u611f\u3002<\/p>\n<h2><strong>\u6e2c\u8a66\u4f60\u7684\u591a SSH \u91d1\u9470\u8a2d\u5b9a<\/strong><\/h2>\n<p>\u4f60\u5df2\u7d93\u7522\u751f\u4e86\u7368\u7acb\u91d1\u9470\u3001\u64b0\u5beb\u4e86 config \u6a94\u6848\uff0c\u4e5f\u628a\u6240\u6709\u5167\u5bb9\u8f09\u5165\u4e86 agent\u3002\u73fe\u5728\u5c31\u5230\u4e86\u9a57\u8b49\u8a2d\u5b9a\u662f\u5426\u771f\u6b63\u751f\u6548\u7684\u6642\u5019\u3002\u9010\u4e00\u6e2c\u8a66\u6bcf\u4e00\u689d\u9023\u7dda\uff0c\u53ef\u4ee5\u78ba\u4fdd\u8a2d\u5b9a\u5b8c\u5168\u7b26\u5408\u9810\u671f\u3002\u9019\u4e00\u6b65\u80fd\u5728\u554f\u984c\u6253\u65b7\u4f60\u7684\u5de5\u4f5c\u6d41\u7a0b\u4e4b\u524d\uff0c\u5148\u628a\u5b83\u5011\u627e\u51fa\u4f86\u3002<\/p>\n<h3>\u4f7f\u7528 -T \u53c3\u6578\u9a57\u8b49\u9023\u7dda<\/h3>\n<p><code>-T<\/code> \u53c3\u6578\u6703\u544a\u8a34 SSH \u505c\u7528\u865b\u64ec\u7d42\u7aef\u6a5f\u5206\u914d\u3002\u5c0d\u65bc Git \u8a17\u7ba1\u5e73\u53f0\u800c\u8a00\uff0c\u9019\u975e\u5e38\u5408\u9069\uff0c\u56e0\u70ba\u4f60\u53ea\u9700\u8981\u9a57\u8b49\u8eab\u5206\u662f\u5426\u6210\u529f\uff0c\u800c\u4e0d\u9700\u8981\u771f\u6b63\u958b\u555f\u4e00\u500b\u4e92\u52d5\u5f0f shell\u3002\u8acb\u91dd\u5c0d\u6bcf\u500b\u5df2\u8a2d\u5b9a\u7684\u4e3b\u6a5f\u5206\u5225\u57f7\u884c\u6e2c\u8a66\u6307\u4ee4\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u91dd\u5c0d\u4f60\u7684\u500b\u4eba GitHub \u5e33\u865f\uff0c\u57f7\u884c\uff1a<\/p>\n<pre><code>ssh -T git@github.com-personal<\/code><\/pre>\n<p>\u6ce8\u610f\uff0c\u9019\u88e1\u7684\u4e3b\u6a5f\u540d\u7a31\u4f7f\u7528\u7684\u662f\u4f60\u5728 config \u6a94\u6848\u4e2d\u5b9a\u7fa9\u7684\u5225\u540d\u3002SSH \u6703\u8b80\u53d6\u9019\u500b\u5225\u540d\uff0c\u627e\u5230\u5c0d\u61c9\u7684\u8a2d\u5b9a\u5340\u584a\uff0c\u4e26\u4f7f\u7528\u6b63\u78ba\u7684\u8eab\u4efd\u6a94\u6848\u3002\u6210\u529f\u6642\uff0c\u56de\u50b3\u8a0a\u606f\u901a\u5e38\u985e\u4f3c\u65bc\uff1a\u300cHi username! You&#8217;ve successfully authenticated, but GitHub does not provide shell access.\u300d\u9019\u8868\u793a GitHub \u5df2\u8fa8\u8b58\u4f60\u7684\u91d1\u9470\uff0c\u4e26\u5c07\u5176\u95dc\u806f\u5230\u6b63\u78ba\u7684\u5e33\u865f\u3002<\/p>\n<p>\u5c0d\u65bc\u4f60\u7684\u5de5\u4f5c GitLab \u57f7\u884c\u500b\u9ad4\uff0c\u53ef\u4ee5\u57f7\u884c\uff1a<\/p>\n<pre><code>ssh -T git@gitlab.com-work<\/code><\/pre>\n<p>GitLab \u6703\u56de\u50b3\u4e00\u5247\u5305\u542b\u4f60\u4f7f\u7528\u8005\u540d\u7a31\u7684\u6b61\u8fce\u8a0a\u606f\u3002\u6bcf\u4e00\u6b21\u6210\u529f\u63d0\u793a\uff0c\u90fd\u4ee3\u8868\u4f60\u7684 config \u6a94\u6848\u5df2\u7d93\u6b63\u78ba\u5730\u5c07\u9023\u7dda\u8def\u7531\u5230\u76ee\u6a19\u8a2d\u5b9a\u3002\u7cfb\u7d71\u7121\u9700\u4efb\u4f55\u624b\u52d5\u4ecb\u5165\uff0c\u5c31\u81ea\u52d5\u9078\u64c7\u4e86\u5408\u9069\u7684\u91d1\u9470\u3002<\/p>\n<p>\u8acb\u628a\u4f60\u5b9a\u7fa9\u904e\u7684\u6bcf\u500b\u4e3b\u6a5f\u90fd\u6e2c\u8a66\u4e00\u6b21\u3002\u4f60\u53ef\u4ee5\u6839\u64da config \u6a94\u6848\u4e2d\u7684\u5225\u540d\u5217\u51fa\u4e00\u4efd\u6e05\u55ae\uff0c\u518d\u9010\u9805\u9a57\u8b49\u3002\u9019\u6a23\u53ef\u4ee5\u7b2c\u4e00\u6642\u9593\u767c\u73fe\u62fc\u5b57\u932f\u8aa4\u3001\u8def\u5f91\u4e0d\u6b63\u78ba\u6216\u8a2d\u5b9a\u4e0d\u5339\u914d\u7b49\u554f\u984c\u3002<\/p>\n<p>\u5982\u679c\u6e2c\u8a66\u5931\u6557\uff0c\u8acb\u4ed4\u7d30\u67e5\u770b\u932f\u8aa4\u8a0a\u606f\u3002\u51fa\u73fe\u300cPermission denied (publickey)\u300d\u901a\u5e38\u8868\u793a SSH \u672a\u80fd\u5b8c\u6210\u9a57\u8b49\u3002\u9019\u6642\u8acb\u6aa2\u67e5 <code>IdentityFile<\/code> \u8def\u5f91\u662f\u5426\u6b63\u78ba\uff1b\u78ba\u8a8d\u516c\u9470\u662f\u5426\u5df2\u52a0\u5165\u9060\u7aef\u4e3b\u6a5f\uff1b\u4e26\u6838\u5c0d\u4f60\u8f38\u5165\u7684\u5225\u540d\u662f\u5426\u8207 config \u4e2d\u5b8c\u5168\u4e00\u81f4\u3002<\/p>\n<h3>\u900f\u904e\u8907\u88fd\u5132\u5b58\u5eab\u78ba\u8a8d\u8a2d\u5b9a\u751f\u6548<\/h3>\n<p><code>-T<\/code> \u6e2c\u8a66\u53ef\u4ee5\u8b49\u660e\u9a57\u8b49\u93c8\u8def\u6c92\u6709\u554f\u984c\u3002\u4f46\u5728\u771f\u5be6\u60c5\u5883\u4e2d\uff0c\u4f60\u6700\u7d42\u9084\u662f\u8981\u8907\u88fd\u5132\u5b58\u5eab\u3002\u56e0\u6b64\uff0c\u505a\u4e00\u6b21\u5be6\u969b\u8907\u88fd\u6e2c\u8a66\uff0c\u624d\u80fd\u8b49\u660e\u6574\u5957\u8a2d\u5b9a\u5728\u6b63\u5e38\u4f7f\u7528\u4e2d\u4e5f\u80fd\u7a69\u5b9a\u904b\u4f5c\u3002<\/p>\n<p>\u5148\u5207\u63db\u5230\u672c\u6a5f\u4e0a\u7684\u4e00\u500b\u66ab\u5b58\u76ee\u9304\uff0c\u7136\u5f8c\u8907\u88fd\u4f60\u500b\u4eba GitHub \u5e33\u865f\u4e0b\u7684\u79c1\u6709\u5132\u5b58\u5eab\uff1a<\/p>\n<pre><code>git clone git@github.com-personal:username\/private-repo.git<\/code><\/pre>\n<p>Git \u6703\u4f7f\u7528\u9019\u500b\u4e3b\u6a5f\u5225\u540d\u4f86\u67e5\u627e\u5c0d\u61c9\u8a2d\u5b9a\uff0c\u4e26\u81ea\u52d5\u9078\u64c7\u4f60\u7684\u500b\u4eba\u91d1\u9470\u3002\u5132\u5b58\u5eab\u61c9\u80fd\u9806\u5229\u4e0b\u8f09\uff0c\u7121\u9700\u984d\u5916\u63d0\u793a\u4f60\u8f38\u5165 passphrase \u6216\u624b\u52d5\u9078\u64c7\u91d1\u9470\u3002\u9019\u8868\u793a\u4f60\u7684\u500b\u4eba\u8a2d\u5b9a\u5df2\u7d93\u904b\u4f5c\u6b63\u5e38\u3002<\/p>\n<p>\u63a5\u8457\uff0c\u6e2c\u8a66\u5de5\u4f5c\u74b0\u5883\u3002\u5207\u63db\u5230\u53e6\u4e00\u500b\u76ee\u9304\uff0c\u4e26\u5f9e\u516c\u53f8 GitLab \u4f3a\u670d\u5668\u8907\u88fd\u5de5\u4f5c\u5c08\u6848\u5132\u5b58\u5eab\uff1a<\/p>\n<pre><code>git clone git@gitlab.com-work:company\/work-project.git<\/code><\/pre>\n<p>\u540c\u6a23\u5730\uff0c\u5225\u540d\u6703\u628a SSH \u5f15\u5c0e\u5230\u6b63\u78ba\u7684\u8eab\u4efd\u6a94\u6848\u3002\u5de5\u4f5c\u5c08\u6848\u5132\u5b58\u5eab\u4e5f\u61c9\u8a72\u80fd\u5920\u6beb\u7121\u885d\u7a81\u5730\u9806\u5229\u8907\u88fd\u4e0b\u4f86\u3002\u81f3\u6b64\uff0c\u4f60\u5c31\u9a57\u8b49\u4e86\u5169\u5957\u91d1\u9470\u8def\u5f91\u53ef\u4ee5\u540c\u6642\u6b63\u5e38\u904b\u4f5c\u3002\u7cfb\u7d71\u5df2\u7d93\u80fd\u5920\u5340\u5206\u4e0d\u540c\u4e3b\u6a5f\uff0c\u4e26\u5728\u6bcf\u6b21\u9023\u7dda\u6642\u81ea\u52d5\u5957\u7528\u6b63\u78ba\u7684\u6191\u8b49\u3002<\/p>\n<p>\u5982\u679c\u4f60\u9084\u8a2d\u5b9a\u4e86\u5176\u4ed6\u670d\u52d9\uff0c\u4e5f\u8acb\u91cd\u8907\u9019\u500b\u6d41\u7a0b\u3002\u70ba\u6bcf\u500b\u4e3b\u6a5f\u90fd\u8907\u88fd\u4e00\u500b\u6e2c\u8a66\u5132\u5b58\u5eab\u3002\u5982\u6b64\u5168\u9762\u7684\u9a57\u8b49\u65b9\u5f0f\uff0c\u80fd\u78ba\u4fdd\u6bcf\u500b\u5225\u540d\u90fd\u771f\u6b63\u53ef\u7528\uff0c\u5f9e\u800c\u907f\u514d\u5728\u65e5\u5e38\u5de5\u4f5c\u4e2d\u906d\u9047\u610f\u5916\u3002<\/p>\n<p>\u6210\u529f\u5b8c\u6210\u8907\u88fd\uff0c\u5c31\u8868\u793a\u4f60\u5df2\u7d93\u505a\u5230\uff1a\u53ea\u9700\u8a2d\u5b9a\u4e00\u6b21\u591a\u500b SSH \u91d1\u9470\uff0c\u4e4b\u5f8c\u5373\u53ef\u9577\u671f\u7a69\u5b9a\u4f7f\u7528\u3002\u6574\u500b\u9a57\u8b49\u904e\u7a0b\u6703\u5728\u80cc\u666f\u975c\u9ed8\u5b8c\u6210\u3002\u4f60\u53ef\u4ee5\u5728\u500b\u4eba\u5c08\u6848\u8207\u5de5\u4f5c\u5c08\u6848\u4e4b\u9593\u81ea\u7531\u5207\u63db\uff0c\u7121\u9700\u624b\u52d5\u5207\u63db\u91d1\u9470\uff0c\u4e5f\u4e0d\u6703\u518d\u88ab\u6b0a\u9650\u932f\u8aa4\u6253\u65b7\uff0c\u66f4\u4e0d\u6703\u6d6a\u8cbb\u591a\u9918\u6642\u9593\u3002<\/p>\n<p>\u73fe\u5728\uff0c\u4f60\u7684\u591a SSH \u91d1\u9470\u5df2\u7d93\u80fd\u5920\u7121\u7e2b\u5354\u540c\u904b\u4f5c\u3002config \u6a94\u6848\u6703\u7cbe\u6e96\u5730\u5c07\u9023\u7dda\u8def\u7531\u5230\u6b63\u78ba\u76ee\u6a19\uff0cagent \u5247\u6703\u5728\u80cc\u666f\u81ea\u52d5\u63d0\u4f9b\u6191\u8b49\u3002\u4f60\u7684\u5de5\u4f5c\u6d41\u7a0b\u5c07\u56e0\u6b64\u8b8a\u5f97\u9806\u66a2\u800c\u9ad8\u6548\u3002<\/p>\n<h2><strong>\u6392\u67e5\u591a\u500b SSH \u91d1\u9470\u4e4b\u9593\u7684\u885d\u7a81<\/strong><\/h2>\n<p>\u5373\u4f7f\u8a2d\u5b9a\u904e\u7a0b\u5df2\u7d93\u8db3\u5920\u8b39\u614e\uff0c\u554f\u984c\u4ecd\u7136\u53ef\u80fd\u51fa\u73fe\u3002\u6700\u5e38\u898b\u7684\u901a\u5e38\u6709\u5169\u985e\uff1a\u6b0a\u9650\u932f\u8aa4\uff0c\u4ee5\u53ca\u7cfb\u7d71\u4f7f\u7528\u4e86\u932f\u8aa4\u7684\u91d1\u9470\u3002\u53ea\u8981\u7406\u89e3\u554f\u984c\u6839\u6e90\uff0c\u9019\u5169\u985e\u6545\u969c\u4e00\u822c\u90fd\u5f88\u5bb9\u6613\u4fee\u5fa9\u3002<\/p>\n<h3>\u4fee\u5fa9\u300cPermission Denied (publickey)\u300d\u932f\u8aa4<\/h3>\n<p>OpenSSH \u6703\u5728\u672c\u6a5f\u4e0a\u56b4\u683c\u6aa2\u67e5\u6b0a\u9650\u3002\u5982\u679c\u4f60\u7684\u79c1\u9470\u6a94\u6848\u6b0a\u9650\u904e\u65bc\u5bec\u9b06\uff0cSSH \u6703\u76f4\u63a5\u62d2\u7d55\u4f7f\u7528\u5b83\u3002\u4f60\u53ef\u80fd\u6703\u770b\u5230\u50cf\u662f\u300cUNPROTECTED PRIVATE KEY\u300d\u6216\u300cPermissions are too open.\u300d\u4e4b\u985e\u7684\u63d0\u793a\u3002\u9019\u4e9b\u932f\u8aa4\u5176\u5be6\u662f\u5728\u4fdd\u8b77\u4f60\uff0c\u907f\u514d\u4f7f\u7528\u4e0d\u5b89\u5168\u7684\u8a2d\u5b9a\u3002<\/p>\n<p>\u5728 macOS \u6216 Linux \u4e0a\uff0c\u57f7\u884c <code>chmod 600 ~\/.ssh\/your-key-file<\/code> \u5373\u53ef\u4fee\u5fa9\u79c1\u9470\u6b0a\u9650\u3002Windows \u4f7f\u7528\u8005\u5247\u9700\u8981\u900f\u904e\u5167\u5bb9\u8996\u7a97\u7684 Security \u7d22\u5f15\u6a19\u7c64\u9032\u884c\u8abf\u6574\u3002\u4ee5\u6ed1\u9f20\u53f3\u9375\u9ede\u64ca\u91d1\u9470\u6a94\u6848\uff0c\u9078\u64c7 Properties\uff0c\u7136\u5f8c\u9032\u5165 Security\uff0c\u518d\u9ede\u9078 Advanced\u3002\u95dc\u9589\u7e7c\u627f\uff0c\u4e26\u79fb\u9664\u9664\u4f60\u81ea\u5df1\u4e4b\u5916\u5176\u4ed6\u4f7f\u7528\u8005\u7684\u6b0a\u9650\u3002<\/p>\n<h3>\u89e3\u6c7a\u7cfb\u7d71\u4f7f\u7528\u4e86\u932f\u8aa4\u91d1\u9470\u7684\u554f\u984c<\/h3>\n<p>\u6709\u6642 SSH \u6703\u628a\u932f\u8aa4\u7684\u91d1\u9470\u9001\u7d66\u9060\u7aef\u4e3b\u6a5f\u3002\u5728\u6c92\u6709\u5176\u4ed6\u660e\u78ba\u6307\u793a\u7684\u60c5\u6cc1\u4e0b\uff0c\u7cfb\u7d71\u6703\u9810\u8a2d\u5617\u8a66 <code>~\/.ssh\/id_rsa<\/code> \u6216 <code>id_ed25519<\/code>\u3002\u4f60\u7684 config \u6a94\u6848\u672c\u61c9\u8986\u84cb\u9019\u7a2e\u9810\u8a2d\u884c\u70ba\uff0c\u4f46\u5be6\u969b\u8a2d\u5b9a\u6642\u96e3\u514d\u6703\u6709\u758f\u6f0f\u3002<\/p>\n<p>\u6b64\u6642\u53ef\u4ee5\u7528\u8a73\u7d30\u6a21\u5f0f\u9032\u884c\u8a3a\u65b7\u3002\u57f7\u884c <code>ssh -v -T git@github.com-personal<\/code>\uff0c\u67e5\u770b\u7cfb\u7d71\u5230\u5e95\u51fa\u793a\u4e86\u54ea\u4e00\u628a\u91d1\u9470\u3002\u8f38\u51fa\u8cc7\u8a0a\u6703\u4f9d\u5e8f\u986f\u793a\u6bcf\u4e00\u6b21\u9a57\u8b49\u5617\u8a66\uff0c\u4f60\u53ef\u4ee5\u5f88\u5feb\u627e\u51fa\u5176\u4e2d\u7684\u932f\u914d\u554f\u984c\u3002<\/p>\n<p>\u4f60\u4e5f\u53ef\u4ee5\u6838\u5c0d\u6307\u7d0b\u3002\u4f8b\u5982\uff0cGitHub \u6703\u516c\u958b\u767c\u5e03\u5176 RSA \u4e3b\u6a5f\u91d1\u9470\u6307\u7d0b\u3002\u4f60\u53ef\u4ee5\u628a\u9023\u7dda\u6642\u986f\u793a\u7684\u6307\u7d0b\u8207\u5b98\u65b9\u516c\u5e03\u503c\u9032\u884c\u6bd4\u5c0d\u3002\u82e5\u5169\u8005\u4e00\u81f4\uff0c\u5c31\u8868\u793a\u4f60\u9023\u7dda\u5230\u7684\u662f\u6b63\u78ba\u7684\u4f3a\u670d\u5668\u3002<\/p>\n<p>\u6700\u5f8c\uff0c\u518d\u78ba\u8a8d\u4e00\u6b21\uff1a\u5c0d\u61c9\u7684\u516c\u9470\u662f\u5426\u78ba\u5be6\u5df2\u52a0\u5165\u9060\u7aef\u670d\u52d9\u4e2d\u3002\u9032\u5165\u4f60\u7684 Git \u8a17\u7ba1\u5e73\u53f0 SSH \u8a2d\u5b9a\u9801\u9762\uff0c\u6aa2\u67e5\u6b63\u78ba\u7684\u516c\u9470\u662f\u5426\u5b58\u5728\u3002\u8acb\u8a18\u4f4f\uff0c\u79c1\u9470\u6c38\u9060\u4e0d\u61c9\u96e2\u958b\u4f60\u7684\u672c\u6a5f\u3002ssh-agent \u53ea\u6703\u5728\u672c\u6a5f\u6301\u6709\u79c1\u9470\uff0c\u4e26\u50c5\u5728\u9a57\u8b49\u6642\u51fa\u793a\u5b83\u3002\u7d55\u5c0d\u4e0d\u8981\u8207\u4efb\u4f55\u4f3a\u670d\u5668\u5206\u4eab\u6216\u8907\u88fd\u4f60\u7684\u79c1\u9470\u3002<\/p>\n<div class=\"qc-divider-wrapper\">\n<div class=\"qc-divider\" style=\"border-top-style: solid; width: 100%; border-top-color: #d1d1d1;\"><\/div>\n<\/div>\n<p>\u81f3\u6b64\uff0c\u4f60\u5df2\u5b8c\u6210\u6574\u500b\u6d41\u7a0b\u3002\u6bcf\u500b\u670d\u52d9\u90fd\u6709\u7368\u7acb\u91d1\u9470\uff1b\u7d50\u69cb\u6e05\u695a\u7684 <code>~\/.ssh\/config<\/code> \u6a94\u6848\u8ca0\u8cac\u70ba\u6bcf\u6b21\u9023\u7dda\u7cbe\u6e96\u8def\u7531\uff1b\u6240\u6709\u6e2c\u8a66\u4e5f\u90fd\u8868\u660e\u4f60\u7684\u8a2d\u5b9a\u904b\u4f5c\u6b63\u5e38\u3002\u9019\u6574\u500b\u6d41\u7a0b\uff0c\u5c31\u662f\u5982\u4f55\u5c07\u591a\u500b SSH \u91d1\u9470\u8a2d\u5b9a\u70ba\u53ef\u540c\u6642\u4f7f\u7528\u7684\u5b8c\u6574\u65b9\u6cd5\u3002<\/p>\n<p>\u5f9e\u73fe\u5728\u958b\u59cb\uff0c\u4f60\u4e0d\u5fc5\u518d\u624b\u52d5\u5207\u63db\u91d1\u9470\u3002\u6b63\u78ba\u7684\u91d1\u9470\u6703\u59cb\u7d42\u5c0d\u61c9\u6b63\u78ba\u7684\u4e3b\u6a5f\u3002ssh-agent \u6703\u5728\u80cc\u666f\u975c\u9ed8\u7ba1\u7406\u6240\u6709\u6191\u8b49\u3002\u9019\u7a2e\u8a2d\u5b9a\u65b9\u5f0f\u4e0d\u50c5\u9069\u7528\u65bc Git \u670d\u52d9\uff0c\u4e5f\u540c\u6a23\u9069\u7528\u65bc\u4efb\u4f55\u9060\u7aef\u4f3a\u670d\u5668\u3002<\/p>\n<p>\u8acb\u52d9\u5fc5\u59a5\u5584\u4fdd\u7ba1\u79c1\u9470\u3002\u6bcf\u4e00\u628a\u91d1\u9470\u90fd\u61c9\u8a2d\u5b9a passphrase\u3002\u4fdd\u6301\u76ee\u9304\u6574\u6f54\uff0c\u522a\u9664\u4e0d\u518d\u4f7f\u7528\u7684\u9805\u76ee\uff0c\u4e26\u5728\u9700\u6c42\u8b8a\u5316\u6642\u53ca\u6642\u66f4\u65b0 config \u6a94\u6848\u3002\u9019\u4e9b\u7fd2\u6163\u5c07\u5e6b\u52a9\u4f60\u9577\u671f\u9ad8\u6548\u5730\u7dad\u8b77\u6574\u5957\u5de5\u4f5c\u6d41\u7a0b\uff0c\u4e5f\u6703\u8b93\u4f60\u6bcf\u5929\u90fd\u7bc0\u7701\u66f4\u591a\u6642\u9593\u3002<\/p>\n<h2><strong>\u5e38\u898b\u554f\u984c<\/strong><\/h2>\n<h3>\u6211\u53ef\u4ee5\u70ba\u591a\u500b\u670d\u52d9\u5171\u7528\u4e00\u628a SSH \u91d1\u9470\u55ce\uff1f<\/h3>\n<p>\u5f9e\u6280\u8853\u4e0a\u4f86\u8aaa\u53ef\u4ee5\uff0c\u4f46\u4e26\u4e0d\u5efa\u8b70\u3002\u70ba\u4e0d\u540c\u670d\u52d9\u4f7f\u7528\u7368\u7acb\u91d1\u9470\uff0c\u53ef\u4ee5\u5728\u67d0\u4e00\u628a\u91d1\u9470\u5916\u6d29\u6642\u5c07\u5f71\u97ff\u7bc4\u570d\u964d\u5230\u6700\u4f4e\uff0c\u4e5f\u66f4\u4fbf\u65bc\u5f8c\u7e8c\u9032\u884c\u63a7\u7ba1\u8207\u64a4\u92b7\u3002<\/p>\n<h3>\u5982\u679c\u4e4b\u5f8c\u6211\u8981\u65b0\u589e\u4e00\u628a SSH \u91d1\u9470\uff0c\u6703\u767c\u751f\u4ec0\u9ebc\u4e8b\uff1f<\/h3>\n<p>\u53ea\u9700\u7528\u4e00\u500b\u6e05\u695a\u6613\u61c2\u7684\u6a94\u540d\u7522\u751f\u65b0\u91d1\u9470\uff1b\u5c07\u516c\u9470\u52a0\u5165\u5c0d\u61c9\u9060\u7aef\u4e3b\u6a5f\uff1b\u5728 config \u6a94\u6848\u4e2d\u65b0\u589e\u4e00\u500b\u8a2d\u5b9a\u5340\u584a\uff1b\u7136\u5f8c\u57f7\u884c <code>ssh-add<\/code> \u628a\u5b83\u8f09\u5165 agent \u5373\u53ef\u3002<\/p>\n<h3>\u70ba\u4ec0\u9ebc SSH \u7e3d\u662f\u4e00\u518d\u8981\u6c42\u6211\u8f38\u5165 passphrase\uff1f<\/h3>\n<p>\u56e0\u70ba\u7cfb\u7d71\u91cd\u65b0\u958b\u6a5f\u5f8c\uff0cagent \u4e2d\u5df2\u8f09\u5165\u7684\u91d1\u9470\u6703\u88ab\u6e05\u7a7a\u3002\u4f60\u53ef\u4ee5\u5728 config \u6a94\u6848\u4e2d\u52a0\u5165 <code>AddKeysToAgent yes<\/code>\u3002\u5982\u679c\u4f60\u4f7f\u7528 macOS\uff0c\u8acb\u642d\u914d <code>ssh-add --apple-use-keychain<\/code>\uff1b\u5982\u679c\u4f60\u4f7f\u7528 Linux\uff0c\u5247\u53ef\u4ee5\u8a2d\u5b9a\u76f8\u61c9\u7684 keychain \u7ba1\u7406\u5de5\u5177\u3002<\/p>\n<h3>\u9019\u5957\u65b9\u6848\u80fd\u5728 Windows \u4e0a\u4f7f\u7528\u55ce\uff1f<\/h3>\n<p>\u53ef\u4ee5\u3002Windows \u7248 OpenSSH \u652f\u63f4\u76f8\u540c\u7684 config \u6a94\u6848\u7d50\u69cb\u3002\u4f60\u7684\u76ee\u9304\u8def\u5f91\u61c9\u4f7f\u7528 <code>%USERPROFILE%\\.ssh\\<\/code>\u3002\u9019\u4e9b\u6307\u4ee4\u5728 PowerShell \u4e2d\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\uff0c\u7121\u9700\u4fee\u6539\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u525b\u5750\u4e0b\uff0c\u6e96\u5099\u628a\u7a0b\u5f0f\u78bc\u63a8\u9001\u5230\u5de5\u4f5c\u7528\u7684 \u7b46\u8a18\u578b\u96fb\u8166\u4e0a\u7ba1\u7406\u4e0d\u540c\u7684 Git \u5e33\u865f\u6642\uff0c\u9019\u7a2e\u632b\u6298\u611f\u975e\u5e38\u5e38\u898b\u3002 \u4f60\u6216\u8a31\u6703\u624b [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":34526,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[8116],"tags":[13179,13180,13181,13182,13183],"class_list":["post-34529","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-japan-dedicated-server-tc","tag-multiple-ssh-keys","tag-ssh-config-file","tag-ssh-agent","tag-github-ssh","tag-ssh-permission-denied"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u5982\u4f55\u5728\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470<\/title>\n<meta name=\"description\" content=\"\u8a2d\u5b9a\u4f3a\u670d\u5668\u4e0a\u7684\u591a\u500b SSH \u91d1\u9470\uff0c\u4f7f\u5176\u80fd\u5920\u85c9\u52a9 config \u6a94\u6848\u8207 ssh-agent \u540c\u6642\u904b\u4f5c\u3002\u4fee\u5fa9\u6b0a\u9650\u932f\u8aa4\u4e26\u7c21\u5316\u4f60\u7684\u5de5\u4f5c\u6d41\u7a0b\u3002\" \/>\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.simcentric.com\/tc\/wp-json\/wp\/v2\/posts\/34529\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"company\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u5728\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/posts\/34529\" \/>\n<meta property=\"og:site_name\" content=\"\u65b0\u5929\u57df\u4e92\u806f\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-04T03:44:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-04T03:58:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.simcentric.com\/wp-content\/uploads\/2026\/09\/sim-blog-2026-09-04-blogB.png\" \/>\n\t<meta property=\"og:image:width\" content=\"610\" \/>\n\t<meta property=\"og:image:height\" content=\"401\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u5728\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470","description":"\u8a2d\u5b9a\u4f3a\u670d\u5668\u4e0a\u7684\u591a\u500b SSH \u91d1\u9470\uff0c\u4f7f\u5176\u80fd\u5920\u85c9\u52a9 config \u6a94\u6848\u8207 ssh-agent \u540c\u6642\u904b\u4f5c\u3002\u4fee\u5fa9\u6b0a\u9650\u932f\u8aa4\u4e26\u7c21\u5316\u4f60\u7684\u5de5\u4f5c\u6d41\u7a0b\u3002","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.simcentric.com\/tc\/wp-json\/wp\/v2\/posts\/34529","og_locale":"zh_TW","og_type":"company","og_title":"\u5982\u4f55\u5728\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470","og_url":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/posts\/34529","og_site_name":"\u65b0\u5929\u57df\u4e92\u806f","article_published_time":"2026-09-04T03:44:34+00:00","article_modified_time":"2026-09-04T03:58:38+00:00","og_image":[{"width":610,"height":401,"url":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2026\/09\/sim-blog-2026-09-04-blogB.png","type":"image\/png"}],"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/#article","isPartOf":{"@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/"},"author":{"name":"Debbie Ng","@id":"https:\/\/simcentric.com\/tc\/#\/schema\/person\/0bfc8768eb7caacbfab4a0855d805626"},"headline":"\u5982\u4f55\u5728\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470","datePublished":"2026-09-04T03:44:34+00:00","dateModified":"2026-09-04T03:58:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/"},"wordCount":169,"publisher":{"@id":"https:\/\/simcentric.com\/tc\/#organization"},"image":{"@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2026\/09\/sim-blog-2026-09-04-blogB.png","keywords":["\u591a\u500bSSH\u91d1\u9470","SSH\u8a2d\u5b9a\u6a94","ssh-agent","GitHub SSH","SSH\u6b0a\u9650\u932f\u8aa4"],"articleSection":["\u65e5\u672c\u4f3a\u670d\u5668"],"inLanguage":"zh-HK"},{"@type":"WebPage","@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/","url":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/","name":"\u5982\u4f55\u5728\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470","isPartOf":{"@id":"https:\/\/simcentric.com\/tc\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/#primaryimage"},"image":{"@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2026\/09\/sim-blog-2026-09-04-blogB.png","datePublished":"2026-09-04T03:44:34+00:00","dateModified":"2026-09-04T03:58:38+00:00","description":"\u8a2d\u5b9a\u4f3a\u670d\u5668\u4e0a\u7684\u591a\u500b SSH \u91d1\u9470\uff0c\u4f7f\u5176\u80fd\u5920\u85c9\u52a9 config \u6a94\u6848\u8207 ssh-agent \u540c\u6642\u904b\u4f5c\u3002\u4fee\u5fa9\u6b0a\u9650\u932f\u8aa4\u4e26\u7c21\u5316\u4f60\u7684\u5de5\u4f5c\u6d41\u7a0b\u3002","breadcrumb":{"@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/#breadcrumb"},"inLanguage":"zh-HK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/"]}]},{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/#primaryimage","url":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2026\/09\/sim-blog-2026-09-04-blogB.png","contentUrl":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2026\/09\/sim-blog-2026-09-04-blogB.png","width":610,"height":401,"caption":"\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470\u793a\u610f\u5716"},{"@type":"BreadcrumbList","@id":"https:\/\/www.simcentric.com\/tc\/japan-dedicated-server-tc\/how-to-configure-multiple-ssh-keys-on-a-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.simcentric.com\/tc\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u5728\u4f3a\u670d\u5668\u4e0a\u8a2d\u5b9a\u591a\u500b SSH \u91d1\u9470"}]},{"@type":"WebSite","@id":"https:\/\/simcentric.com\/tc\/#website","url":"https:\/\/simcentric.com\/tc\/","name":"Simcentric Solutions","description":"","publisher":{"@id":"https:\/\/simcentric.com\/tc\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simcentric.com\/tc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-HK"},{"@type":"Organization","@id":"https:\/\/simcentric.com\/tc\/#organization","name":"Simcentric Solutions","url":"https:\/\/simcentric.com\/tc\/","logo":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/simcentric.com\/tc\/#\/schema\/logo\/image\/","url":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2023\/06\/sim-logo-2023.png","contentUrl":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2023\/06\/sim-logo-2023.png","width":800,"height":222,"caption":"Simcentric Solutions"},"image":{"@id":"https:\/\/simcentric.com\/tc\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/simcentric.com\/tc\/#\/schema\/person\/0bfc8768eb7caacbfab4a0855d805626","name":"Debbie Ng","image":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/secure.gravatar.com\/avatar\/9f3420f60d27329ed6e921ddaae5206353d0a7414d1abb6f1f0b32b4fd849965?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9f3420f60d27329ed6e921ddaae5206353d0a7414d1abb6f1f0b32b4fd849965?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9f3420f60d27329ed6e921ddaae5206353d0a7414d1abb6f1f0b32b4fd849965?s=96&d=mm&r=g","caption":"Debbie Ng"}}]}},"_links":{"self":[{"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/posts\/34529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/comments?post=34529"}],"version-history":[{"count":3,"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/posts\/34529\/revisions"}],"predecessor-version":[{"id":34535,"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/posts\/34529\/revisions\/34535"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/media\/34526"}],"wp:attachment":[{"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/media?parent=34529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/categories?post=34529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.simcentric.com\/tc\/wp-json\/wp\/v2\/tags?post=34529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}