<br />
<b>Warning</b>:  Use of undefined constant WP_ALLOW_REPAIR - assumed 'WP_ALLOW_REPAIR' (this will throw an Error in a future version of PHP) in <b>/var/www/wordpress/wp-config.php</b> on line <b>17</b><br />
{"id":455,"date":"2016-08-27T02:15:54","date_gmt":"2016-08-26T18:15:54","guid":{"rendered":"https:\/\/peloo.net\/?p=455"},"modified":"2018-02-04T11:23:40","modified_gmt":"2018-02-04T11:23:40","slug":"linux%e5%8d%87%e7%ba%a7%e5%ae%89%e8%a3%85openssh","status":"publish","type":"post","link":"https:\/\/peloo.net\/?p=455","title":{"rendered":"Linux\u5347\u7ea7\u5b89\u88c5openssh7.5p1"},"content":{"rendered":"<p>\n\t<span style=\"font-size:18px\"><a href=\"https:\/\/peloo.net\/wp-content\/uploads\/2016\/08\/openssh.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-medium wp-image-823\" height=\"89\" src=\"https:\/\/peloo.net\/wp-content\/uploads\/2016\/08\/openssh-300x89.jpg\" width=\"300\" srcset=\"https:\/\/peloo.net\/wp-content\/uploads\/2016\/08\/openssh-300x89.jpg 300w, https:\/\/peloo.net\/wp-content\/uploads\/2016\/08\/openssh.jpg 605w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/span>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<div>\n\t<strong><span style=\"font-size:18px\">\u4e00\u3001\u80cc\u666f\u7b80\u4ecb<\/span><\/strong>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">&nbsp; openssh\u9891\u7e41\u7684\u7206\u51fa\u6f0f\u6d1e\uff0c\u73b0\u5728\u7684yum\u6e90\u7248\u672c\u90fd\u592a\u4f4e\uff0c\u4e00\u822c\u662fOpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013\uff0c\u5b89\u5168\u6027\u592a\u5dee\uff0c\u5f3a\u70c8\u5efa\u8bae\u53bbopenssh\u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u8fdb\u884c\u7f16\u8bd1\u5b89\u88c5\u5347\u7ea7\u3002<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">\u73b0\u4ee5CentOS6.7\u4e3a\u4f8b\u5347\u7ea7openssh\u7248\u672c\u3002<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<strong><span style=\"font-size:18px\">\u4e8c\u3001\u7cfb\u7edf\u73af\u5883<\/span><\/strong>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">Linux OS\uff1aCentOS 6.7 x86_64<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">\u539fopenssh\u7248\u672c : OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">\u65b0openssh\u7248\u672c\uff1aOpenSSH_7.5p1, OpenSSL 1.0.1e-fips 11 Feb 2013<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">iptables\u5173\u95ed &nbsp; &nbsp;service iptables stop<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">selinux\u5173\u95ed &nbsp; &nbsp;setenforce 0<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<strong><span style=\"font-size:18px\">\u4e09\u3001\u5347\u7ea7openssh<\/span><\/strong>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">#1 \u5b89\u88c5openssh\u8f6f\u4ef6\u7684\u6240\u9700\u4f9d\u8d56\u5305<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">yum -y install telnet telnet-server openssl openssl-devel zlib zlib-devel pam-devel<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">#2 \u914d\u7f6etelnet\u670d\u52a1\u4ee5\u4fbf\u4e8e\u5378\u8f7d\u8001\u7248\u672copenssh\u540e\u7684\u8fdc\u7a0b\u8fde\u63a5<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">sed -r -i -e &lsquo;\/disable\/ s\/yes\/no\/g&rsquo; \/etc\/xinetd.d\/telnet<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">## \u542f\u52a8telnet\u670d\u52a1<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">service xinetd start<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">##\u6682\u65f6\u4e0d\u9000\u51fassh\u8fde\u63a5\uff0c\u4e00\u822c\u5347\u7ea7\u7684\u65f6\u5019\u4e0d\u4f1a\u65ad\u5f00ssh\u8fde\u63a5\uff0c\u5efa\u4e2aTelnet\u670d\u52a1\u53ea\u662f\u4ee5\u9632\u4e07\u4e00\u3002<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">#3 \u5378\u8f7d\u5c31openssh\u4ee5\u53ca\u76f8\u5173\u4f9d\u8d56\u5305\u548c\u5907\u4efdsshd_config\u914d\u7f6e\u6587\u4ef6<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">rpm -e --nodeps --allmatches `rpm -qa|grep openssh`<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">\\cp -v \/etc\/ssh\/sshd_config \/etc\/ssh\/sshd_config.bak<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">#4 \u5b98\u7f51\u4e0b\u8f7dopenssh\u7248\u672c7.5p1\u5230\/tmp\u76ee\u5f55<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">wget -c -P \/tmp&nbsp;<a href=\"http:\/\/openbsd.cs.toronto.edu\/pub\/OpenBSD\/OpenSSH\/portable\/openssh-7.5p1.tar.gz\">http:\/\/openbsd.cs.toronto.edu\/pub\/OpenBSD\/OpenSSH\/portable\/openssh-7.5p1.tar.gz<\/a><\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">#5 \u7f16\u8bd1\u5b89\u88c5openssh7.5p1<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">cd \/tmp\/<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">tar zxvf openssh-7.5p1.tar.gz<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">cd openssh-7.5p1<\/span>\n<\/div>\n<div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:18px\"><span style=\"line-height: 1.6\">.\/configure --prefix=\/usr --sysconfdir=\/etc\/ssh --with-md5-passwords --with-pam --with-tcp-wrappers --with-ssl-dir=\/usr\/local\/ssl&nbsp;&nbsp; --without-hardening<\/span><\/span>\n\t<\/div>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">make &amp;&amp; make install<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">## \u590d\u5236\u542f\u52a8\u6587\u4ef6\u5230\/etc\/init.d<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">\\cp -v contrib\/redhat\/sshd.init \/etc\/init.d\/sshd<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">chmod +x \/etc\/init.d\/sshd<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">chkconfig --add sshd<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">chkconfig sshd on<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">#6 \u4e3a\u4e86\u5b89\u5168\u8d77\u89c1\uff0c\u5efa\u8bae\u914d\u7f6e\u4e0d\u5141\u8bb8root\u767b\u9646\uff0c\u6ce8\u610f\u63d0\u524d\u5efa\u7acbLinux\u7528\u6237<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">[ -n &ldquo;`grep &ldquo;^PermitRootLogin&rdquo; \/etc\/ssh\/sshd_config`&rdquo; ] &amp;&amp; sed -i -r -e &lsquo;\/^PermitRootLogin\/d&rsquo; sshd_config || echo &ldquo;PermitRootLogin no&rdquo; &gt;&gt; \/etc\/ssh\/sshd_config<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">service sshd start<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">\u56db\u3001\u9a8c\u8bc1\u5347\u7ea7\u540e\u7684\u7248\u672c<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">[root@S5 \/]# ssh -V<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">OpenSSH_7.5p1, OpenSSL 1.0.1e-fips 11 Feb 2013<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">\u6b65\u9aa4\u4e09\u76846\u4e2a\u5c0f\u6b65\u9aa4\u53ef\u4ee5\u76f4\u63a5\u590d\u5236\u5230shell\u63a7\u5236\u53f0\u6267\u884c\uff0c\u8fdb\u884cssh\u7684\u5347\u7ea7\uff0c\u6ce8\u610f\u4ece\u672c\u6587\u62f7\u8d1d\u7684\u5b57\u7b26&ldquo;&ndash;&rdquo;\u5230shell\u4e2d\u53ef\u80fd\u4f1a\u5f02\u5e38\uff0c\u5efa\u8bae\u5148\u62f7\u8d1d\u5230\u5176\u4ed6\u6587\u672c\u7f16\u8f91\u5668\u91cc\u68c0\u67e5\u65e0\u8bef\u540e\u518d\u62f7\u8d1d\u5230shell\u547d\u4ee4\u884c\u6267\u884c\u5347\u7ea7\u3002<\/span>\n<\/div>\n<div>\n\t<span style=\"font-size:18px\">(\u5b8c)<\/span>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u4e00\u3001\u80cc\u666f\u7b80\u4ecb &nbsp; openssh\u9891\u7e41\u7684\u7206\u51fa\u6f0f\u6d1e\uff0c\u73b0\u5728\u7684yum\u6e90\u7248\u672c\u90fd\u592a\u4f4e\uff0c\u4e00\u822c\u662fOpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013\uff0c\u5b89\u5168\u6027\u592a\u5dee\uff0c\u5f3a\u70c8\u5efa\u8bae\u53bbopenssh\u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u8fdb\u884c\u7f16\u8bd1\u5b89\u88c5\u5347\u7ea7\u3002 \u73b0\u4ee5CentOS6.7\u4e3a\u4f8b\u5347\u7ea7openssh\u7248\u672c\u3002 &nbsp; \u4e8c\u3001\u7cfb\u7edf\u73af\u5883 Linux OS\uff1aCentOS 6.7 x86_64 \u539fopenssh\u7248\u672c : OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 \u65b0openssh\u7248\u672c\uff1aOpenSSH_7.5p1, OpenSSL 1.0.1e-fips 11 Feb 2013 iptables\u5173\u95ed &nbsp; &nbsp;service iptables stop selinux\u5173\u95ed &nbsp; &nbsp;setenforce 0 &nbsp; \u4e09\u3001\u5347\u7ea7openssh #1 \u5b89\u88c5openssh\u8f6f\u4ef6\u7684\u6240\u9700\u4f9d\u8d56\u5305 yum -y install telnet telnet-server openssl openssl-devel zlib zlib-devel pam-devel &nbsp; #2&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-455","post","type-post","status-publish","format-standard","hentry","category-sec"],"aioseo_notices":[],"brizy_media":[],"_links":{"self":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=455"}],"version-history":[{"count":35,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":1156,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/455\/revisions\/1156"}],"wp:attachment":[{"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}