{"id":13080,"date":"2025-03-31T15:07:47","date_gmt":"2025-03-31T07:07:47","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=13080"},"modified":"2025-04-01T09:25:31","modified_gmt":"2025-04-01T01:25:31","slug":"gbase-8a%e9%9b%86%e7%be%a4%e5%9c%a8%e7%94%a8%e6%88%b7%e4%bf%ae%e6%94%b9%e4%ba%86sshd%e9%bb%98%e8%ae%a4%e7%ab%af%e5%8f%a3%e6%97%b6%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/13080","title":{"rendered":"GBase 8a\u96c6\u7fa4\u5728\u7528\u6237\u4fee\u6539\u4e86sshd\u9ed8\u8ba4\u7aef\u53e3\u65f6\u5982\u4f55\u5b89\u88c5"},"content":{"rendered":"<p>Linux \u4e0bssh\u9ed8\u8ba4\u670d\u52a1\u7aef\u53e3\u662f22, \u5982\u679c\u7528\u6237\u4fee\u6539\u4e86\u8be5\u7aef\u53e3\uff0c\u6bd4\u59822222\uff0c\u5219\u4f1a\u5bfc\u81f4ssh\u65e0\u6cd5\u8fde\u63a522\u7aef\u53e3\u800c\u62a5\u9519\u3002\u672c\u6587\u4ecb\u7ecd\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cGBase 8a\u96c6\u7fa4\u5b89\u88c5\u7684\u65b9\u6cd5\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2b8237cd0e8\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2b8237cd0e8\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/13080\/#sshd%E9%85%8D%E7%BD%AE%E4%BA%862222%E7%AB%AF%E5%8F%A3\" >sshd\u914d\u7f6e\u4e862222\u7aef\u53e3<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/13080\/#%E9%BB%98%E8%AE%A4ssh%E8%BF%9E%E6%8E%A5%E8%AF%A5%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%8A%A5%E9%94%99\" >\u9ed8\u8ba4ssh\u8fde\u63a5\u8be5\u670d\u52a1\u5668\u62a5\u9519<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/13080\/#%E5%BF%85%E9%A1%BB%E6%8C%87%E5%AE%9A-p_%E5%8F%82%E6%95%B0\" >\u5fc5\u987b\u6307\u5b9a-p \u53c2\u6570<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/13080\/#%E4%BF%AE%E6%94%B9%E7%94%A8%E6%88%B7%E7%BA%A7ssh%E9%85%8D%E7%BD%AE%E5%AE%9E%E7%8E%B0%E6%8C%87%E5%AE%9A%E7%AB%AF%E5%8F%A3\" >\u4fee\u6539\u7528\u6237\u7ea7ssh\u914d\u7f6e\u5b9e\u73b0\u6307\u5b9a\u7aef\u53e3<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/13080\/#%E5%AE%89%E8%A3%85\" >Install<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.gbase8.cn\/en\/13080\/#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\" >\u914d\u7f6e\u6587\u4ef6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.gbase8.cn\/en\/13080\/#%E5%AE%89%E8%A3%85%E6%88%90%E5%8A%9F\" >\u5b89\u88c5\u6210\u529f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.gbase8.cn\/en\/13080\/#%E6%9F%A5%E7%9C%8Bgcware%E7%9A%84ssh%E7%AB%AF%E5%8F%A3\" >\u67e5\u770bgcware\u7684ssh\u7aef\u53e3<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"sshd%E9%85%8D%E7%BD%AE%E4%BA%862222%E7%AB%AF%E5%8F%A3\"><\/span>sshd\u914d\u7f6e\u4e862222\u7aef\u53e3<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@gbase_rh7_003 ~]# grep Port  \/etc\/ssh\/sshd_config\nPort 2222\n#GatewayPorts no\n&#91;root@gbase_rh7_003 ~]#<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E9%BB%98%E8%AE%A4ssh%E8%BF%9E%E6%8E%A5%E8%AF%A5%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%8A%A5%E9%94%99\"><\/span>\u9ed8\u8ba4ssh\u8fde\u63a5\u8be5\u670d\u52a1\u5668\u62a5\u9519<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@gbase_rh7_004 ~]# ssh 10.0.2.103\nssh: connect to host 10.0.2.103 port 22: Connection refused\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%BF%85%E9%A1%BB%E6%8C%87%E5%AE%9A-p_%E5%8F%82%E6%95%B0\"><\/span>\u5fc5\u987b\u6307\u5b9a-p \u53c2\u6570<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@gbase_rh7_004 ~]# ssh 10.0.2.103 -p 2222\nroot@10.0.2.103's password:\nPermission denied, please try again.\nroot@10.0.2.103's password:\nPermission denied, please try again.\nroot@10.0.2.103's password:\nPermission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\n&#91;root@gbase_rh7_004 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BF%AE%E6%94%B9%E7%94%A8%E6%88%B7%E7%BA%A7ssh%E9%85%8D%E7%BD%AE%E5%AE%9E%E7%8E%B0%E6%8C%87%E5%AE%9A%E7%AB%AF%E5%8F%A3\"><\/span>\u4fee\u6539\u7528\u6237\u7ea7ssh\u914d\u7f6e\u5b9e\u73b0\u6307\u5b9a\u7aef\u53e3<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u7528\u6237\u7ea7ssh\u914d\u7f6e\u6587\u4ef6\u4e3a ~\/.ssh\/config, \u5176\u6743\u9650\u53ef\u4ee5\u8bbe\u7f6e\u4e3a600\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@gbase_rh7_003 ~]# cat \/home\/gbase\/.ssh\/config\nHost 10.0.2.10?\n        port 2222\n<\/code><\/pre>\n\n\n\n<p>\u8be5\u914d\u7f6e\u7684\u8be6\u7ec6\u7528\u6237\u53ef\u4ee5\u81ea\u884c\u641c\u7d22\uff0c\u5df2\u77e5\u7684<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u53ef\u4ee5\u6307\u5b9a\u591a\u4e2aIP\uff0c\u6bcf\u4e2a\u90e8\u5206\u7528Host\u4f5c\u4e3a\u5f00\u5934<\/li><li>IP\u53ef\u4ee5\u7528\u901a\u914d\u7b26\uff0c\u6bd4\u5982?\u6216\u8005*<\/li><li>IP\u53ef\u4ee5\u7528CIDR,\u6bd4\u5982192.168.1.0\/24<\/li><li>IP\u3010\u4e0d\u652f\u6301\u3011\u8303\u56f4\uff0c\u6bd4\u5982100-106\uff0c\u6709\u4e9b\u90c1\u95f7<\/li><li>host\u7684IP\u53ef\u4ee5\u4e00\u6b21\u6307\u5b9a\u591a\u4e2a\uff0c\u4e2d\u95f4\u7528\u7a7a\u683c\u5206\u9694\u3002\u5982\u679c\u4f60\u7684\u7248\u672c\u4e0d\u652f\u6301\uff0c\u53c8\u65e0\u6cd5\u7528\u901a\u914d\u7b26\uff0c\u90a3\u5c31\u6bcf\u4e2aIP\u5199\u4e00\u6bb5\u3002<\/li><\/ul>\n\n\n\n<p>\u591a\u4e2ahost\u7684\u6d4b\u8bd5\u7ed3\u679c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;gbase@gbase_rh7_003 gcinstall]$ cat ~\/.ssh\/config\r\nHost 10.0.2.103 10.0.2.104\r\n        port 2222\r\n\r\nHost 10.0.2.105\r\n        port 22\r\n&#91;gbase@gbase_rh7_003 gcinstall]$\r\n\n&#91;gbase@gbase_rh7_003 ~]$\n&#91;gbase@gbase_rh7_003 ~]$ ssh 10.0.2.103\ngbase@10.0.2.103's password:\n\n&#91;gbase@gbase_rh7_003 ~]$ ssh 10.0.2.104\ngbase@10.0.2.104's password:\n\n&#91;gbase@gbase_rh7_003 ~]$ ssh 10.0.2.105\ngbase@10.0.2.105's password:\n\n&#91;gbase@gbase_rh7_003 ~]$ <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%AE%89%E8%A3%85\"><\/span>Install<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\"><\/span>\u914d\u7f6e\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u7531\u4e8egcware\u670d\u52a1\u7528ssh\u63a2\u6d4b\u673a\u5668\u662f\u5426\u5728\u7ebf\uff0c\u6240\u4ee5\u901a\u8fc7sshPort\u53c2\u6570\u6307\u5b9a\u3002\u8be5\u53c2\u6570\u5c06\u5199\u5165\u5230gcware.conf\u91cc\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;gbase@gbase_rh7_003 gcinstall]$ cat demo.options\ninstallPrefix= \/opt\/gbase\ncoordinateHost = 10.0.2.103,10.0.2.104\ncoordinateHostNodeID = 234,235,237\ndataHost = 10.0.2.103,10.0.2.104\n#existCoordinateHost =\n#existDataHost =\n#existGcwareHost=\ngcwareHost = 10.0.2.103,10.0.2.104\ngcwareHostNodeID = 234,235,237\ndbaUser = gbase\ndbaGroup = gbase\ndbaPwd = 'gbase1234'\nrootPwd = ''\n#dbaHome =\n#numaCpuBind=''\n#numaMemBind=''\n#numaHddBind=''\n#dbRootPwd = ''\n#rootPwdFile = rootPwd.json\n#characterSet = utf8\nsshPort = 2222\n#genDBUser=gbase\n#genDBPwd=GBase2O11O531\n&#91;gbase@gbase_rh7_003 gcinstall]$ cat demo.options | grep sshPort\nsshPort = 2222\n&#91;gbase@gbase_rh7_003 gcinstall]$\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%AE%89%E8%A3%85%E6%88%90%E5%8A%9F\"><\/span>\u5b89\u88c5\u6210\u529f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>10.0.2.104              install gcware and cluster on host 10.0.2.104 successfully.\n10.0.2.103              install gcware and cluster on host 10.0.2.103 successfully.\nStarting all gcluster nodes ...\nadding new datanodes to gcware ...\nInstallCluster Successfully\n&#91;gbase@gbase_rh7_003 gcinstall]$ gcadmin\nbash: gcadmin: command not found...\n&#91;gbase@gbase_rh7_003 gcinstall]$ source ~\/.gbase_profile\n&#91;gbase@gbase_rh7_003 gcinstall]$ gcadmin\nCLUSTER STATE:         ACTIVE\n\n====================================\n| GBASE GCWARE CLUSTER INFORMATION |\n====================================\n| NodeName |  IpAddress   | gcware |\n------------------------------------\n| gcware1  |  10.0.2.103  |  OPEN  |\n------------------------------------\n| gcware2  |  10.0.2.104  |  OPEN  |\n------------------------------------\n====================================================\n|      GBASE COORDINATOR CLUSTER INFORMATION       |\n====================================================\n|   NodeName   | IpAddress  | gcluster | DataState |\n----------------------------------------------------\n| coordinator1 | 10.0.2.103 |   OPEN   |     0     |\n----------------------------------------------------\n| coordinator2 | 10.0.2.104 |   OPEN   |     0     |\n----------------------------------------------------\n===========================================================\n|        GBASE CLUSTER FREE DATA NODE INFORMATION         |\n===========================================================\n| NodeName  | IpAddress  | gnode | syncserver | DataState |\n-----------------------------------------------------------\n| FreeNode1 | 10.0.2.104 | OPEN  |    OPEN    |     0     |\n-----------------------------------------------------------\n| FreeNode2 | 10.0.2.103 | OPEN  |    OPEN    |     0     |\n-----------------------------------------------------------\n\n0 virtual cluster\n2 coordinator node\n2 free data node\n\n&#91;gbase@gbase_rh7_003 gcinstall]$ <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9F%A5%E7%9C%8Bgcware%E7%9A%84ssh%E7%AB%AF%E5%8F%A3\"><\/span>\u67e5\u770bgcware\u7684ssh\u7aef\u53e3<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@gbase_rh7_003 ~]# grep ssh_port \/opt\/gbase\/10.0.2.103\/gcware\/config\/gcware.conf\n    node_ssh_port: 2222\n&#91;root@gbase_rh7_003 ~]#\n<\/code><\/pre>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Linux \u4e0bssh\u9ed8\u8ba4\u670d\u52a1\u7aef\u53e3\u662f22, \u5982\u679c\u7528\u6237\u4fee\u6539\u4e86\u8be5\u7aef\u53e3\uff0c\u6bd4\u59822222\uff0c\u5219\u4f1a\u5bfc\u81f4ssh\u65e0\u6cd5\u8fde\u63a522\u7aef\u53e3\u800c\u62a5\u9519\u3002\u672c\u6587\u4ecb\u7ecd\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cGBase 8a\u96c6\u7fa4\u5b89\u88c5\u7684\u65b9\u6cd5\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-13080","post","type-post","status-publish","format-standard","hentry","category-gbase8a"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=13080"}],"version-history":[{"count":8,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13080\/revisions"}],"predecessor-version":[{"id":13090,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13080\/revisions\/13090"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=13080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=13080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=13080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}