{"id":339,"date":"2018-07-16T00:25:32","date_gmt":"2018-07-15T16:25:32","guid":{"rendered":"http:\/\/blog.lovexu.cc\/?p=339"},"modified":"2020-05-12T22:29:01","modified_gmt":"2020-05-12T14:29:01","slug":"centos%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%aegateone%e5%ae%9e%e7%8e%b0web%e7%bb%88%e7%ab%afssh%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/lox.im\/index.php\/339.html","title":{"rendered":"CentOS\u5b89\u88c5\u914d\u7f6eGateOne\u5b9e\u73b0Web\u7ec8\u7aefSSH\u529f\u80fd"},"content":{"rendered":"<p>\u8f6c\u8f7d\u81ea\u8001\u5de6\u535a\u5ba2\u3002<\/p>\n<p>\u8001\u5de6\u672c\u6765\u8ba1\u5212\u8fd9\u7bc7\u6587\u7ae0\u5199WSSH\u5de5\u5177\u5b9e\u73b0\u6d4f\u89c8\u5668Web\u8bbf\u95eeSSH\u7684\u6548\u679c\uff0c\u5728\u67e5\u9605\u76f8\u5173\u6587\u7ae0\u7684\u65f6\u5019\u770b\u5230\u529f\u80fd\u66f4\u5f3a\u5927\u7684<a class=\"tag_link\" title=\"View all posts in GateOne\" href=\"http:\/\/www.laozuo.org\/tag\/gateone\" target=\"_blank\" rel=\"noopener noreferrer\" rel=\"nofollow\" >GateOne<\/a>\u3002<a class=\"tag_link\" title=\"View all posts in GateOne\" href=\"http:\/\/www.laozuo.org\/tag\/gateone\" target=\"_blank\" rel=\"noopener noreferrer\" rel=\"nofollow\" >GateOne<\/a>\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u4e14\u57fa\u4e8eHTML5\u7684\u9002\u5408WEB\u7ec8\u7aefSSH\u5de5\u5177\uff0c\u5bf9\u4e8e\u6211\u4eec\u4e00\u822c\u7528\u6237\u800c\u8a00\u57fa\u672c\u4e0a\u7528\u4e0d\u5230\uff0c\u4f46\u662f\u597d\u5947\u5fc3\u4f7f\u5f97\u6211\u4e5f\u8981\u53bb\u770b\u770b\u8fd9\u6b3e\u5de5\u5177\u5230\u5e95\u662f\u4ec0\u4e48\u6837\u5b50\u7684\u3002<\/p>\n<p>\u72b9\u8c6b\u5728\u914d\u7f6e\u8fc7\u7a0b\u4e2d\u9047\u5230\u5404\u79cd\u95ee\u9898\u4e14\u53c2\u9605\u5230\u65e0\u6570\u7684\u6587\u6863\uff0c\u5927\u7ea6\u8017\u65f6\u4e09\u56db\u4e2a\u5c0f\u65f6\u624d\u5b9e\u73b0GateOne\u5b89\u88c5\u914d\u7f6e\uff0c\u672c\u6253\u7b97\u653e\u5f03\u7684\uff0c\u4f46\u6700\u7ec8\u8fd8\u662f\u575a\u6301\u4e0b\u6765\u81f3\u5c11\u53ef\u4ee5\u786e\u4fdd\u5f53\u524d\u8bb0\u5f55\u4e0b\u6765\u7684\u5185\u5bb9\u662f\u5b8c\u6574\u7684\u3002GateOne\u8fd8\u53ef\u4ee5\u7528\u4e8e\u4e00\u4e9b\u5e94\u7528\u7684\u6f5c\u5165\u4efb\u52a1\uff0c\u8fd9\u91cc\u4e0d\u5728\u6211\u63a2\u7d22\u7684\u8303\u56f4\uff0c\u6211\u53ea\u662f\u7b80\u5355\u7684\u5728Linux VPS\u4e2d\u5b89\u88c5\uff0c\u770b\u770b\u5b9e\u9645\u7684\u754c\u9762\u4f53\u9a8c\u3002<\/p>\n<p>\u7b2c\u4e00\u3001\u51c6\u5907\u5de5\u4f5c<\/p>\n<p>1\u3001\u8fd9\u91cc\u8001\u5de6\u662f\u57fa\u4e8eCentOS 7 64bit\u7cfb\u7edf\u5b89\u88c5\u3002<\/p>\n<p>2\u3001\u80af\u5b9a\u662f\u5728\u6d4b\u8bd5\u673a\u73af\u5883\uff0c\u6ca1\u6709\u5176\u4ed6\u91cd\u8981\u6570\u636e\u5728\u670d\u52a1\u5668\u4e2d\u3002<\/p>\n<p>3\u3001GateOne\u5b89\u88c5\u7eaf\u5c5e\u63a2\u7d22\u4e0d\u4e00\u6837\u7684\u5de5\u5177\u548c\u597d\u5947\u5fc3\uff0c\u5927\u90e8\u5206\u7528\u6237\u6ca1\u6709\u5b9e\u9645\u751f\u4ea7\u9700\u6c42\u3002<\/p>\n<p>4\u3001\u6587\u7ae0\u6709\u53c2\u8003http:\/\/www.isvee.com\/archives\/1595\u3001https:\/\/github.com\/liftoff\/GateOne\u3002<\/p>\n<p>\u7b2c\u4e8c\u3001\u5b89\u88c5PIP<\/p>\n<blockquote><p>wget https:\/\/soft.laozuo.org\/git\/get-pip.py<br \/>\npython get-pip.py<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-677\" src=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-1.jpg\" width=\"628\" height=\"365\" alt=\"GateOne-1\" title=\"GateOne-1\" srcset=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-1.jpg 628w, https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-1-300x174.jpg 300w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/p>\n<p>\u7b2c\u4e09\u3001\u5b89\u88c5tornado\u3001Pillow<\/p>\n<blockquote><p>pip install 'tornado==2.4.1'<br \/>\npip install Pillow<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-678\" src=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-2.jpg\" width=\"632\" height=\"224\" alt=\"GateOne-2\" title=\"GateOne-2\" srcset=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-2.jpg 632w, https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-2-300x106.jpg 300w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/p>\n<p>\u7b2c\u56db\u3001\u4e0b\u8f7dGateOne\u4e14\u5b89\u88c5<\/p>\n<blockquote><p>wget https:\/\/github.com\/downloads\/liftoff\/GateOne\/gateone-1.1.tar.gz<br \/>\ntar -zxvf gateone-1.1.tar.gz<br \/>\ncd GateOne<br \/>\npython setup.py install<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-679\" src=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-3.jpg\" width=\"623\" height=\"283\" alt=\"GateOne-3\" title=\"GateOne-3\" srcset=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-3.jpg 623w, https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-3-300x136.jpg 300w\" sizes=\"auto, (max-width: 623px) 100vw, 623px\" \/><\/p>\n<p>\u7b2c\u4e94\u3001\u8fd0\u884cGateOne<\/p>\n<blockquote><p>cd \/opt\/gateone<br \/>\n.\/gateone.py<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-680\" src=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-4.jpg\" width=\"620\" height=\"242\" alt=\"GateOne-4\" title=\"GateOne-4\" srcset=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-4.jpg 620w, https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-4-300x117.jpg 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>\u5230\u73b0\u5728\uff0c\u5982\u679c\u6211\u4eec\u662f\u672c\u5730\u5b89\u88c5\uff0c\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u4e2d\u4ee5https:\/\/127.0.0.1:443\u6253\u5f00\uff0c\u4f46\u662f\u6211\u4eec\u4e0d\u8981\u8fd9\u6837\u7684\uff0c\u6211\u4eec\u8981\u76f4\u63a5\u8fdc\u7a0b\u6253\u5f00\uff0c\u6bd4\u5982\u8f93\u5165\u670d\u52a1\u5668IP:\u7aef\u53e3\u7136\u540e\u8fdc\u7a0b\u7ba1\u7406\u3002<\/p>\n<p>\u7b2c\u516d\u3001\u4fee\u6539GateOne\u914d\u7f6e\u8fdc\u7a0b\u7ba1\u7406<\/p>\n<blockquote><p>\/opt\/gateone\/server.conf<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-681\" src=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-5.jpg\" width=\"614\" height=\"242\" alt=\"GateOne-5\" title=\"GateOne-5\" srcset=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-5.jpg 614w, https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-5-300x118.jpg 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/p>\n<p>\u56e0\u4e3a\u76ee\u524d\u4e0d\u597d\u5916\u7f51\u8bbf\u95ee\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u3002\u4e3b\u8981\u662f\u5c06origins\u8fd9\u91cc\u6dfb\u52a0\u4e0a\u56fe\u6240\u793a\u7684\u5185\u5bb9\uff0c\u6211\u4eec\u7684\u670d\u52a1\u5668IP\u5730\u5740\u8981\u52a0\u5165\u8fdb\u53bb\u3002\u540c\u65f6\uff0c\u5728\u5f53\u524d\u6587\u4ef6\u4e2d\u4e0a\u9762\u90e8\u5206port\u7aef\u53e3\u90e8\u5206\u9ed8\u8ba4\u662f443\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u4fee\u6539\u6210\u81ea\u5df1\u7684\u7aef\u53e3\u3002<\/p>\n<blockquote><p>iptables -I INPUT -p tcp --dport\u00a0443\u00a0-j ACCEPT<\/p><\/blockquote>\n<p>\u9ed8\u8ba4\u662f443\u7aef\u53e3\uff0c\u6211\u4eec\u9700\u8981\u653e\u884c\uff0c\u5982\u679c\u662f\u4fee\u6539\u7684\u5176\u4ed6\u81ea\u5b9a\u4e49\u7aef\u53e3\uff0c\u7167\u4f8b\u4fee\u6539\u653e\u884c\u3002\u5dee\u70b9\u5fd8\u8bb0\u4e86\uff0c\u8fd8\u9700\u8981\u5728\u4e0a\u9762\u914d\u7f6e\u6587\u4ef6\u4e2d\u52a0\u5165\uff1a<\/p>\n<blockquote><p>session_timeout = \"20m\"<\/p><\/blockquote>\n<p>\u5982\u679c\u4e0d\u52a0\u5165\u4f1a\u4e00\u76f4\u5728\u5237\u65b0\u5237\u65b0\u7684\uff0c\u65e0\u6cd5\u64cd\u4f5c\u3002<\/p>\n<p>\u7b2c\u4e03\u3001\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\u670d\u52a1<\/p>\n<p>\u5982\u679c\u5fc5\u987b\u8981\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\u9ed8\u8ba4\u540e\u53f0\u8fd0\u884c\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u9700\u8981\u8fd0\u884c\u7684\u65f6\u5019\u6267\u884c\u3002<\/p>\n<blockquote><p>cd \/opt\/gateone<br \/>\n.\/gateone.py<\/p><\/blockquote>\n<p>\u8fd9\u6837\u5728\u5730\u5740\u680f\u4e2d\u8f93\u5165https:\/\/\u670d\u52a1\u5668IP\u5730\u5740:\u81ea\u5b9a\u4e49\u7aef\u53e3\u5c31\u53ef\u4ee5\u53bb\u8bbf\u95ee\u3002\u90a3\u5982\u679c\u6211\u4eec\u9700\u8981\u8bbe\u5b9a\u81ea\u52a8\u540e\u53f0\u8fd0\u884c\u3002<\/p>\n<blockquote><p>\/sbin\/chkconfig gateone on<br \/>\nsystemctl start gateone<\/p><\/blockquote>\n<p>\u7b2c\u516b\u3001GateOne\u6f14\u793a\u770b\u770b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-682\" src=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-6.jpg\" width=\"640\" height=\"288\" alt=\"GateOne-6\" title=\"GateOne-6\" srcset=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-6.jpg 640w, https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/GateOne-6-300x135.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u4ece\u6211\u4eec\u8bbe\u5b9a\u7684\u670d\u52a1\u5668IP\u5730\u5740:\u7aef\u53e3\uff0c\u6253\u5f00\u5373\u53ef\u770b\u5230WEB\u72b6\u6001\u7684SSH\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u7ba1\u7406\u9700\u8981\u8fdc\u7a0b\u7ba1\u7406\u7684\u670d\u52a1\u5668\u3002<\/p>\n<p>\u603b\u7ed3\uff0cGateOne\u5bf9\u4e8e\u4e00\u822c\u529f\u80fd\u7528\u9014\u7684\u7528\u6237\u6ca1\u6709\u5fc5\u8981\uff0c\u6211\u4eec\u7528xshell\u6216\u8005putty\u8db3\u591f\u7ba1\u7406\uff0c\u4f46\u662f\u9700\u8981\u8fdb\u884c\u6df1\u5165\u5f00\u53d1\u7684\uff0c\u57fa\u4e8e\u5e94\u7528\u5185\u5d4cSSH\u5de5\u5177\u7684\u8fd8\u662f\u6709\u9700\u8981\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\u81ea\u8001\u5de6\u535a\u5ba2\u3002 \u8001\u5de6\u672c\u6765\u8ba1\u5212\u8fd9\u7bc7\u6587\u7ae0\u5199WSSH\u5de5\u5177\u5b9e\u73b0\u6d4f\u89c8\u5668Web\u8bbf\u95eeSSH\u7684\u6548\u679c\uff0c\u5728\u67e5\u9605\u76f8\u5173\u6587\u7ae0\u7684\u65f6\u5019\u770b\u5230\u529f\u80fd\u66f4\u5f3a\u5927\u7684Gate &#8230;<\/p>\n","protected":false},"author":1,"featured_media":340,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[4],"tags":[11],"class_list":["post-339","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet","tag-11"],"_links":{"self":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts\/339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/comments?post=339"}],"version-history":[{"count":0,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts\/339\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/media\/340"}],"wp:attachment":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/media?parent=339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/categories?post=339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/tags?post=339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}