{"id":63,"date":"2017-03-28T15:54:20","date_gmt":"2017-03-28T07:54:20","guid":{"rendered":"http:\/\/www.jsjs.org\/?p=63"},"modified":"2017-03-28T15:54:20","modified_gmt":"2017-03-28T07:54:20","slug":"ssh-keygen-%e7%9a%84-%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=63","title":{"rendered":"ssh-keygen \u7684 \u8be6\u89e3"},"content":{"rendered":"<pre class=\"command-line\"><span class=\"command\">ssh-keygen -t rsa -b 4096 -C \"<em>your_email@example.com<\/em>\"<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u4e3a\u4e86\u8ba9\u4e24\u4e2a<a class=\"replace_word\" title=\"Linux\u77e5\u8bc6\u5e93\" href=\"http:\/\/lib.csdn.net\/base\/linux\" target=\"_blank\" rel=\"noopener\">Linux<\/a>\u673a\u5668\u4e4b\u95f4\u4f7f\u7528ssh\u4e0d\u9700\u8981\u7528\u6237\u540d\u548c\u5bc6\u7801<\/strong>\u3002\u6240\u4ee5\u91c7\u7528\u4e86\u6570\u5b57\u7b7e\u540dRSA\u6216\u8005DSA\u6765\u5b8c\u6210\u8fd9\u4e2a\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u6a21\u578b\u5206\u6790<\/strong><\/p>\n<p>\u5047\u8bbe A \uff08192.168.20.59\uff09\u4e3a\u5ba2\u6237\u673a\u5668\uff0cB\uff08192.168.20.60\uff09\u4e3a\u76ee\u6807\u673a\uff1b<\/p>\n<p>\u8981\u8fbe\u5230\u7684\u76ee\u7684\uff1a<br \/>\nA\u673a\u5668ssh\u767b\u5f55B\u673a\u5668\u65e0\u9700\u8f93\u5165\u5bc6\u7801\uff1b<br \/>\n\u52a0\u5bc6\u65b9\u5f0f\u9009 rsa|dsa\u5747\u53ef\u4ee5\uff0c\u9ed8\u8ba4dsa<\/p>\n<p><strong>ssh-keygen -t rsa #\u4f7f\u7528rsa\u52a0\u5bc6<\/strong><\/p>\n<p>\u4e8c\u3001\u5177\u4f53\u64cd\u4f5c\u6d41\u7a0b<\/p>\n<p><strong>\u5355\u5411\u767b\u9646<\/strong>\u7684\u64cd\u4f5c\u8fc7\u7a0b\uff08\u80fd\u6ee1\u8db3\u4e0a\u8fb9\u7684\u76ee\u7684\uff09\uff1a<br \/>\n<strong>1\u3001\u767b\u5f55A\u673a\u5668<br \/>\n2\u3001ssh-keygen -t <\/strong>[rsa|dsa]\uff0c<strong>\u5c06\u4f1a\u751f\u6210\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6<\/strong> id_rsa,id_rsa.pub\u6216id_dsa,id_dsa.pub<br \/>\n3\u3001\u5c06 .pub \u6587\u4ef6\u590d\u5236\u5230B\u673a\u5668\u7684 .ssh \u76ee\u5f55\uff0c\u00a0\u5e76 cat id_dsa.pub &gt;&gt; ~\/.ssh\/authorized_keys<br \/>\n4\u3001\u5927\u529f\u544a\u6210\uff0c\u4eceA\u673a\u5668\u767b\u5f55B\u673a\u5668\u7684\u76ee\u6807\u8d26\u6237\uff0c\u4e0d\u518d\u9700\u8981\u5bc6\u7801\u4e86\uff1b\uff08\u76f4\u63a5\u8fd0\u884c<strong> #ssh 192.168.20.60<\/strong> \uff09<\/p>\n<p>\u53cc\u5411\u767b\u9646\u7684\u64cd\u4f5c\u8fc7\u7a0b\uff1a<\/p>\n<p>1\u3001ssh-keygen\u505a\u5bc6\u7801\u9a8c\u8bc1\u53ef\u4ee5\u4f7f\u5728\u5411\u5bf9\u65b9\u673a\u5668\u4e0assh ,scp\u4e0d\u7528\u4f7f\u7528\u5bc6\u7801.\u5177\u4f53\u65b9\u6cd5\u5982\u4e0b:<br \/>\n2\u3001\u4e24\u4e2a\u8282\u70b9\u90fd\u6267\u884c\u64cd\u4f5c\uff1a<strong>#ssh-keygen -t rsa<\/strong><br \/>\n\u7136\u540e\u5168\u90e8\u56de\u8f66,\u91c7\u7528\u9ed8\u8ba4\u503c.<\/p>\n<p>3\u3001\u8fd9\u6837\u751f\u6210\u4e86\u4e00\u5bf9\u5bc6\u94a5\uff0c\u5b58\u653e\u5728\u7528\u6237\u76ee\u5f55\u7684~\/.ssh\u4e0b\u3002<br \/>\n<strong>\u5c06\u516c\u94a5\u8003\u5230\u5bf9\u65b9\u673a\u5668\u7684\u7528\u6237\u76ee\u5f55\u4e0b<\/strong> \uff0c\u5e76\u5c06\u5176\u590d\u5236\u5230~\/.ssh\/authorized_keys\u4e2d\uff08\u64cd\u4f5c\u547d\u4ee4\uff1a<strong>#cat id_dsa.pub &gt;&gt; ~\/.ssh\/authorized_keys<\/strong> \uff09\u3002<\/p>\n<p>4\u3001\u8bbe\u7f6e\u6587\u4ef6\u548c\u76ee\u5f55\u6743\u9650\uff1a<\/p>\n<p>\u8bbe\u7f6eauthorized_keys\u6743\u9650<br \/>\n$ chmod 600 authorized_keys<br \/>\n\u8bbe\u7f6e.ssh\u76ee\u5f55\u6743\u9650<br \/>\n$ chmod 700 -R .ssh<\/p>\n<p>5\u3001\u8981\u4fdd\u8bc1.ssh\u548cauthorized_keys\u90fd\u53ea\u6709\u7528\u6237\u81ea\u5df1\u6709\u5199\u6743\u9650\u3002\u5426\u5219\u9a8c\u8bc1\u65e0\u6548\u3002\uff08\u4eca\u5929\u5c31\u662f\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\uff0c\u627e\u4e86\u597d\u4e45\u95ee\u9898\u6240\u5728\uff09\uff0c\u5176\u5b9e\u4ed4\u7ec6\u60f3\u60f3\uff0c\u8fd9\u6837\u505a\u662f\u4e3a\u4e86\u4e0d\u4f1a\u51fa\u73b0\u7cfb\u7edf\u6f0f\u6d1e\u3002<\/p>\n<p>\u6211\u4ece20.60\u53bb\u8bbf\u95ee20.59\u7684\u65f6\u5019\u4f1a\u63d0\u793a\u5982\u4e0b\u9519\u8bef\uff1a<\/p>\n<div>\n<div><\/div>\n<p>The\u00a0authenticity\u00a0of\u00a0host\u00a0&#8216;192.168.20.59\u00a0(192.168.20.59)&#8217;\u00a0can&#8217;t\u00a0be\u00a0established.\u00a0\u00a0RSA\u00a0key\u00a0fingerprint\u00a0is\u00a06a:37:c0:e1:09:a4:29:8d:68:d0:ca:21:20:94:be:18.\u00a0\u00a0Are\u00a0you\u00a0sure\u00a0you\u00a0want\u00a0to\u00a0continue\u00a0connecting\u00a0(yes\/no)?\u00a0yes\u00a0\u00a0Warning:\u00a0Permanently\u00a0added\u00a0&#8216;192.168.20.59&#8217;\u00a0(RSA)\u00a0to\u00a0the\u00a0list\u00a0of\u00a0known\u00a0hosts.\u00a0\u00a0root@192.168.20.59&#8217;s\u00a0password:\u00a0\u00a0\u00a0Permission\u00a0denied,\u00a0please\u00a0try\u00a0again.\u00a0\u00a0root@192.168.20.59&#8217;s\u00a0password:\u00a0\u00a0\u00a0Permission\u00a0denied,\u00a0please\u00a0try\u00a0again.\u00a0\u00a0root@192.168.20.59&#8217;s\u00a0password:\u00a0\u00a0\u00a0Permission\u00a0denied\u00a0(publickey,gssapi-with-mic,password).<\/p>\n<\/div>\n<p>\u4e09\u3001\u603b\u7ed3\u6ce8\u610f\u4e8b\u9879<\/p>\n<p>1\u3001\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u6743\u9650\u5343\u4e07\u522b\u8bbe\u7f6e\u6210chmod 777.\u8fd9\u4e2a\u6743\u9650\u592a\u5927\u4e86\uff0c\u4e0d\u5b89\u5168\uff0c\u6570\u5b57\u7b7e\u540d\u4e5f\u4e0d\u652f\u6301\u3002\u6211\u5f00\u59cb\u56fe\u7701\u4e8b\u5c31\u8fd9\u4e48\u5e72\u4e86<\/p>\n<p>2\u3001\u751f\u6210\u7684rsa\/dsa\u7b7e\u540d\u7684\u516c\u94a5\u662f\u7ed9\u5bf9\u65b9\u673a\u5668\u4f7f\u7528\u7684\u3002\u8fd9\u4e2a\u516c\u94a5\u5185\u5bb9\u8fd8\u8981\u62f7\u8d1d\u5230authorized_keys<\/p>\n<p>3\u3001linux\u4e4b\u95f4\u7684\u8bbf\u95ee\u76f4\u63a5 ssh \u673a\u5668ip<\/p>\n<p>4\u3001\u67d0\u4e2a\u673a\u5668\u751f\u6210\u81ea\u5df1\u7684RSA\u6216\u8005DSA\u7684\u6570\u5b57\u7b7e\u540d\uff0c\u5c06\u516c\u94a5\u7ed9\u76ee\u6807\u673a\u5668\uff0c\u7136\u540e\u76ee\u6807\u673a\u5668\u63a5\u6536\u540e\u8bbe\u5b9a\u76f8\u5173\u6743\u9650\uff08\u516c\u94a5\u548cauthorized_keys\u6743\u9650\uff09\uff0c\u8fd9\u4e2a\u76ee\u6807\u673a\u5c31\u80fd\u88ab\u751f\u6210\u6570\u5b57\u7b7e\u540d\u7684\u673a\u5668\u65e0\u5bc6\u7801\u8bbf\u95ee\u4e86<\/p>\n<p>ssh-keygen\u8bbe\u7f6essh\u65e0\u5bc6\u7801\u767b\u5f55<\/p>\n<div id=\"sina_keyword_ad_area2\">\n<pre>ssh-keygen - \u751f\u6210\u3001\u7ba1\u7406\u548c\u8f6c\u6362\u8ba4\u8bc1\u5bc6\u94a5\uff0c\u5305\u62ec RSA \u548c DSA \u4e24\u79cd\u5bc6\u94a5\n\u5bc6\u94a5\u7c7b\u578b\u53ef\u4ee5\u7528 <strong>-t<\/strong> \u9009\u9879\u6307\u5b9a\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5219\u9ed8\u8ba4\u751f\u6210\u7528\u4e8eSSH-2\u7684RSA\u5bc6\u94a5\n\n\u914d\u7f6e\uff1a\n1\u3001\u5728\u672c\u5730\u673a\u5668\u4e2d\u7684~\/.ssh\/\u76ee\u5f55\u4e0b\u6267\u884c\u4e0b\u547d\u4ee4\nssh-keygen -t dsa\n\u5c06\u751f\u6210\u4e24\u4e2a\u6587\u4ef6,id_dsa\u548cid_dsa.pub\n\n2\u3001\u5c06id_dsa.pub\u62f7\u8d1d\u5230\u8fdc\u7a0b\u673a\u5668,\u5e76\u4e14\u5c06id_dsa.pub\u7684\u5185\u5bb9\u6dfb\u52a0\u5230~\/.ssh\/authorized_keys\u4e2d\ncat id_dsa.pub &gt;&gt;authorized_keys\n\u6ce8\u610f:\u76ee\u5f55.ssh\u548c\u6587\u4ef6authorized_keys\u7684\u6743\u9650\u5fc5\u987b\u662f600\n\n\u5b8c\u6210\u4ee5\u4e0a\u64cd\u4f5c\u4e4b\u540e\uff0c\u7528\u6237\u4ece\u672c\u5730\u673a\u5668\u5230\u8fdc\u7a0b\u673a\u5668\u5c31\u4e0d\u9700\u8981\u7528\u5bc6\u7801\u4e86\n\n\n\u51e0\u4e2a\u6587\u4ef6\u7684\u4f5c\u7528\u8bf4\u660e\uff0c\u6458\u81eahttp:\/\/lamp.linux.gov.cn\/OpenSSH\/ssh-keygen.html\n<\/pre>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>~\/.ssh\/identity<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u8be5\u7528\u6237\u9ed8\u8ba4\u7684\u00a0<wbr \/>RSA1\u00a0<wbr \/>\u8eab\u4efd\u8ba4\u8bc1\u79c1\u94a5(SSH-1)\u3002\u6b64\u6587\u4ef6\u7684\u6743\u9650\u5e94\u5f53\u81f3\u5c11\u9650\u5236\u4e3a&#8221;600&#8243;\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u751f\u6210\u5bc6\u94a5\u7684\u65f6\u5019\u53ef\u4ee5\u6307\u5b9a\u91c7\u7528\u5bc6\u8bed\u6765\u52a0\u5bc6\u8be5\u79c1\u94a5(3DES)\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/><a href=\"http:\/\/www.openbsd.org\/cgi-bin\/man.cgi?query=ssh\">ssh<\/a>\u5c06\u5728\u767b\u5f55\u7684\u65f6\u5019\u8bfb\u53d6\u8fd9\u4e2a\u6587\u4ef6\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>~\/.ssh\/identity.pub<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u8be5\u7528\u6237\u9ed8\u8ba4\u7684\u00a0<wbr \/>RSA1\u00a0<wbr \/>\u8eab\u4efd\u8ba4\u8bc1\u516c\u94a5(SSH-1)\u3002\u6b64\u6587\u4ef6\u65e0\u9700\u4fdd\u5bc6\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u6b64\u6587\u4ef6\u7684\u5185\u5bb9\u5e94\u8be5\u6dfb\u52a0\u5230\u6240\u6709\u00a0<wbr \/>RSA1\u00a0<wbr \/>\u76ee\u6807\u4e3b\u673a\u7684\u00a0<wbr \/>~\/.ssh\/authorized_keys\u00a0<wbr \/>\u6587\u4ef6\u4e2d\u3002<\/p>\n<p><wbr \/><\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>~\/.ssh\/id_dsa<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u8be5\u7528\u6237\u9ed8\u8ba4\u7684\u00a0<wbr \/>DSA\u00a0<wbr \/>\u8eab\u4efd\u8ba4\u8bc1\u79c1\u94a5(SSH-2)\u3002\u6b64\u6587\u4ef6\u7684\u6743\u9650\u5e94\u5f53\u81f3\u5c11\u9650\u5236\u4e3a&#8221;600&#8243;\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u751f\u6210\u5bc6\u94a5\u7684\u65f6\u5019\u53ef\u4ee5\u6307\u5b9a\u91c7\u7528\u5bc6\u8bed\u6765\u52a0\u5bc6\u8be5\u79c1\u94a5(3DES)\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/><a href=\"http:\/\/www.openbsd.org\/cgi-bin\/man.cgi?query=ssh\">ssh<\/a>\u5c06\u5728\u767b\u5f55\u7684\u65f6\u5019\u8bfb\u53d6\u8fd9\u4e2a\u6587\u4ef6\u3002<\/p>\n<p><wbr \/><\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>~\/.ssh\/id_dsa.pub<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u8be5\u7528\u6237\u9ed8\u8ba4\u7684\u00a0<wbr \/>DSA\u00a0<wbr \/>\u8eab\u4efd\u8ba4\u8bc1\u516c\u94a5(SSH-2)\u3002\u6b64\u6587\u4ef6\u65e0\u9700\u4fdd\u5bc6\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u6b64\u6587\u4ef6\u7684\u5185\u5bb9\u5e94\u8be5\u6dfb\u52a0\u5230\u6240\u6709\u00a0<wbr \/>DSA\u00a0<wbr \/>\u76ee\u6807\u4e3b\u673a\u7684\u00a0<wbr \/>~\/.ssh\/authorized_keys\u00a0<wbr \/>\u6587\u4ef6\u4e2d\u3002<\/p>\n<p><wbr \/><\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>~\/.ssh\/id_rsa<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u8be5\u7528\u6237\u9ed8\u8ba4\u7684\u00a0<wbr \/>RSA\u00a0<wbr \/>\u8eab\u4efd\u8ba4\u8bc1\u79c1\u94a5(SSH-2)\u3002\u6b64\u6587\u4ef6\u7684\u6743\u9650\u5e94\u5f53\u81f3\u5c11\u9650\u5236\u4e3a&#8221;600&#8243;\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u751f\u6210\u5bc6\u94a5\u7684\u65f6\u5019\u53ef\u4ee5\u6307\u5b9a\u91c7\u7528\u5bc6\u8bed\u6765\u52a0\u5bc6\u8be5\u79c1\u94a5(3DES)\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/><a href=\"http:\/\/www.openbsd.org\/cgi-bin\/man.cgi?query=ssh\">ssh<\/a>\u5c06\u5728\u767b\u5f55\u7684\u65f6\u5019\u8bfb\u53d6\u8fd9\u4e2a\u6587\u4ef6\u3002<\/p>\n<p><wbr \/><\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>~\/.ssh\/id_rsa.pub<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u8be5\u7528\u6237\u9ed8\u8ba4\u7684\u00a0<wbr \/>RSA\u00a0<wbr \/>\u8eab\u4efd\u8ba4\u8bc1\u516c\u94a5(SSH-2)\u3002\u6b64\u6587\u4ef6\u65e0\u9700\u4fdd\u5bc6\u3002<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u6b64\u6587\u4ef6\u7684\u5185\u5bb9\u5e94\u8be5\u6dfb\u52a0\u5230\u6240\u6709\u00a0<wbr \/>RSA\u00a0<wbr \/>\u76ee\u6807\u4e3b\u673a\u7684\u00a0<wbr \/>~\/.ssh\/authorized_keys\u00a0<wbr \/>\u6587\u4ef6\u4e2d\u3002<\/p>\n<p><wbr \/><\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\/etc\/ssh\/moduli<\/p>\n<p><wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u00a0<wbr \/>\u5305\u542b\u7528\u4e8e\u00a0<wbr \/>DH-GEX\u00a0<wbr \/>\u7684\u00a0<wbr \/>Diffie-Hellman\u00a0<wbr \/>groups<\/p>\n<p>BG2BLT01 is on, BG2BLT02 is power off. They\u2019re too noisy L<\/p>\n<p>When and how to move them to data center?<\/p>\n<p>&nbsp;<\/p>\n<p>Please update SSH key in .33 server for <a class=\"replace_word\" title=\"Git\u77e5\u8bc6\u5e93\" href=\"http:\/\/lib.csdn.net\/base\/git\" target=\"_blank\" rel=\"noopener\">Git<\/a> repo access.<\/p>\n<p>ssh-keygen -t dsa<\/p>\n<p>&nbsp;<\/p>\n<p>scp ~\/.ssh\/id_dsa.pub [YOUR_USER_NAME]@10.38.116.33:authorized_keys<\/p>\n<p>&nbsp;<\/p>\n<p>ssh [YOUR_USER_NAME]@ 10.38.116.33<\/p>\n<p>&nbsp;<\/p>\n<p>skip below 3 steps if you already have .ssh and .ssh\/authorized_keys<\/p>\n<p>mkdir -m 700 .ssh<\/p>\n<p>touch .ssh\/authorized_keys<\/p>\n<p>chmod 600 .ssh\/authorized_keys<\/p>\n<p>&nbsp;<\/p>\n<p>cat authorized_keys &gt;&gt; .ssh\/authorized_keys;exit<\/p>\n<p>&nbsp;<\/p>\n<p>vi ~\/.ssh\/config<\/p>\n<p>add lines and save quit<\/p>\n<p>host 10.38.116.33<\/p>\n<p>user [YOUR_USER_NAME]<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>ssh-keygen -t rsa -b 4096 -C &#8220;your_email@example.com&#8221; &nbsp; &nbsp; \u4e3a\u4e86\u8ba9\u4e24\u4e2aLinux\u673a\u5668\u4e4b\u95f4\u4f7f\u7528ssh\u4e0d\u9700\u8981\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002\u6240\u4ee5\u91c7\u7528\u4e86\u6570\u5b57\u7b7e\u540dRSA\u6216\u8005DSA\u6765\u5b8c\u6210\u8fd9\u4e2a\u64cd\u4f5c\u3002 \u6a21\u578b\u5206\u6790 \u5047\u8bbe A \uff08192.168.20.59\uff09\u4e3a\u5ba2\u6237\u673a\u5668\uff0cB\uff08192.168.20.60\uff09\u4e3a\u76ee\u6807\u673a\uff1b \u8981\u8fbe\u5230\u7684\u76ee\u7684\uff1a A\u673a\u5668ssh\u767b\u5f55B\u673a\u5668\u65e0\u9700\u8f93\u5165\u5bc6\u7801\uff1b \u52a0\u5bc6\u65b9\u5f0f\u9009 rsa|dsa\u5747\u53ef\u4ee5\uff0c\u9ed8\u8ba4dsa ssh-keygen -t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}