{"id":5282,"date":"2021-04-12T11:44:42","date_gmt":"2021-04-12T03:44:42","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=5282"},"modified":"2023-11-08T10:44:48","modified_gmt":"2023-11-08T02:44:48","slug":"redhat7-%e5%8d%87%e7%ba%a7openssh-8-5-p1%e6%89%8b%e9%a1%ba","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/5282","title":{"rendered":"redhat7 \u5347\u7ea7openssh 8.5 p1\u624b\u987a"},"content":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecd\u5728redhat 7\u4e0a\u5347\u7ea7openssh 8.5 p1\u7684\u65b9\u6cd5\uff0c\u5305\u62ecopenssl\u7684\u4f9d\u8d56\u5347\u7ea7\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-6a2ac67f592d0\" 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-6a2ac67f592d0\"  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\/5282\/#%E6%8C%82%E8%BD%BDyum%E6%BA%90\" >\u6302\u8f7dyum\u6e90<\/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\/5282\/#%E7%BC%96%E8%BE%91%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\" >\u7f16\u8f91\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-3\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E6%B7%BB%E5%8A%A0%E5%A6%82%E4%B8%8B%E4%BF%A1%E6%81%AF\" >\u6dfb\u52a0\u5982\u4e0b\u4fe1\u606f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E4%BF%9D%E5%AD%98%EF%BC%8C%E6%B5%8B%E8%AF%95yum%E6%BA%90\" >\u4fdd\u5b58\uff0c\u6d4b\u8bd5yum\u6e90<\/a><\/li><\/ul><\/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\/5282\/#%E5%AE%89%E8%A3%85telnet\" >\u5b89\u88c5telnet<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#telnet%E7%99%BB%E5%BD%95\" >telnet\u767b\u5f55<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E5%90%AF%E5%8A%A8telnet%E6%9C%8D%E5%8A%A1\" >\u542f\u52a8telnet\u670d\u52a1<\/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\/5282\/#%E9%85%8D%E7%BD%AEpst%E7%B1%BB%E5%9E%8B%E7%BB%88%E7%AB%AF%E5%88%B0etcsecuretty\" >\u914d\u7f6epst\u7c7b\u578b\u7ec8\u7aef\u5230\/etc\/securetty<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E5%BC%80%E5%90%AFtelnet%E7%9A%84root%E7%99%BB%E5%BD%95\" >\u5f00\u542ftelnet\u7684root\u767b\u5f55<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E6%9F%A5%E7%9C%8Bopenssh%E5%92%8Copenssl%E7%89%88%E6%9C%AC\" >\u67e5\u770bopenssh\u548copenssl\u7248\u672c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E5%A4%87%E4%BB%BD%E5%B9%B6%E7%A7%BB%E9%99%A4%E8%80%81%E6%96%87%E4%BB%B6\" >\u5907\u4efd\u5e76\u79fb\u9664\u8001\u6587\u4ef6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E5%AE%89%E8%A3%85%E4%BE%9D%E8%B5%96%E5%8C%85\" >\u5b89\u88c5\u4f9d\u8d56\u5305<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E8%A7%A3%E5%8E%8B%E5%B9%B6%E5%AE%89%E8%A3%85openssl%E5%8C%85\" >\u89e3\u538b\u5e76\u5b89\u88c5openssl\u5305<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E8%A7%A3%E5%8E%8B\" >\u89e3\u538b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E9%85%8D%E7%BD%AE\" >\u914d\u7f6e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85\" >\u7f16\u8bd1\u5b89\u88c5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E5%90%8E%E7%BB%AD\" >\u540e\u7eed<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E8%A7%A3%E5%8E%8B%E5%B9%B6%E5%AE%89%E8%A3%85openssh%E5%8C%85\" >\u89e3\u538b\u5e76\u5b89\u88c5openssh\u5305<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.gbase8.cn\/en\/5282\/#%E8%AE%A9SHA1%E7%BB%A7%E7%BB%AD%E5%8F%AF%E7%94%A8%E7%9A%84%E6%96%B9%E6%B3%95\" >\u8ba9SHA1\u7ee7\u7eed\u53ef\u7528\u7684\u65b9\u6cd5<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%8C%82%E8%BD%BDyum%E6%BA%90\"><\/span>\u6302\u8f7dyum\u6e90<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%BC%96%E8%BE%91%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\"><\/span>\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#vim \/etc\/yum.repos.d\/my.repo<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%B7%BB%E5%8A%A0%E5%A6%82%E4%B8%8B%E4%BF%A1%E6%81%AF\"><\/span>\u6dfb\u52a0\u5982\u4e0b\u4fe1\u606f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;my-yum]\nname=Red Hat Enterprise Linux 7.3\nbaseurl=file:\/\/\/run\/media\/root\/RHEL-7.3\\ Server.x86_64\/\nenabled=1 \ngpgcheck=1\ngpgkey=file:\/\/\/run\/media\/root\/RHEL-7.3\\ Server.x86_64\/RPM-GPG-KEY-redhat-beta,file:\/\/\/run\/media\/root\/RHEL-7.3\\ Server.x86_64\/RPM-GPG-KEY-redhat-release\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BF%9D%E5%AD%98%EF%BC%8C%E6%B5%8B%E8%AF%95yum%E6%BA%90\"><\/span>\u4fdd\u5b58\uff0c\u6d4b\u8bd5yum\u6e90<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#yum clean all\n#yummakecache\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%AE%89%E8%A3%85telnet\"><\/span>\u5b89\u88c5telnet<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u56e0\u4e3assh\u662f\u8fdc\u7a0b\u670d\u52a1\uff0c\u5982\u679c\u4e0d\u662f\u5728\u673a\u623f\u7ec8\u7aef\u673a\uff0c\u6216\u8005\u6709\u5e26\u5916\u7ba1\u7406\u7684\u8bdd\uff0c\u5fc5\u987b\u8981\u4e34\u65f6\u5b89\u88c5\u4e00\u4e2a\u8fdc\u7a0b\u5de5\u5177\uff0c\u907f\u514dssh\u65e0\u6548\u540e\u670d\u52a1\u5668\u65e0\u6cd5\u8fdc\u7a0b\u8bbf\u95ee\u4e86\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#yum search telnet<\/code><\/pre>\n\n\n\n<p>\u9700\u8981\u5b89\u88c5\u4ee5\u4e0b\u4e24\u4e2atelnet\u5305\uff08server\u7aef\u548cclient\u7aef\uff09<\/p>\n\n\n\n<p>telnet.x86_64 : The client program for the Telnet remote login protocol<br>telnet-server.x86_64 : The server program for the Telnet remote login protocol<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#yum install telnet-server.x86_64\n#yum install telnet.x86_64\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"telnet%E7%99%BB%E5%BD%95\"><\/span>telnet\u767b\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u786e\u8ba4telnet\u670d\u52a1\u53ef\u7528\uff0c\u5305\u62ec\u5f00\u673a\u81ea\u542f\u52a8\uff0c\u907f\u514d\u4e07\u4e00\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%90%AF%E5%8A%A8telnet%E6%9C%8D%E5%8A%A1\"><\/span>\u542f\u52a8telnet\u670d\u52a1<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl enable telnet.socke\n# systemctl start telnet.socket\n# systemctl status telnet.socket\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"128\" src=\"https:\/\/www.gbase8.cn\/wp-content\/uploads\/2021\/04\/image-2.png\" alt=\"\" class=\"wp-image-5287\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E9%85%8D%E7%BD%AEpst%E7%B1%BB%E5%9E%8B%E7%BB%88%E7%AB%AF%E5%88%B0etcsecuretty\"><\/span>\u914d\u7f6epst\u7c7b\u578b\u7ec8\u7aef\u5230\/etc\/securetty<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u6ce8\uff1a\/etc\/securetty\u6587\u4ef6\u5141\u8bb8\u4f60\u89c4\u5b9a\u201croot\u201d\u7528\u6237\u53ef\u4ee5\u4ece\u90a3\u4e2aTTY\u8bbe\u5907\u767b\u5f55\uff0c\u767b\u5f55\u7a0b\u5e8f\uff08\u901a\u5e38\u662f\u201c\/bin\/login\u201d\uff09\u9700\u8981\u8bfb\u53d6\u201c\/etc\/securetty\u201d\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u5b83\u7684\u683c\u5f0f\u662f\uff1a\u5217\u51fa\u6765\u7684tty\u8bbe\u5907\u90fd\u662f\u5141\u8bb8\u767b\u5f55\u7684\uff0c\u6ce8\u91ca\u6389\u6216\u662f\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u4e0d\u5b58\u5728\u7684\u90fd\u662f\u4e0d\u5141\u8bb8root\u767b\u5f55\u7684\u3002<\/p>\n\n\n\n<p>\u6ce8\u91ca\u6389\uff08\u5728\u8fd9\u4e00\u884c\u7684\u5f00\u5934\u52a0\u4e0a\uff03\u53f7\uff09\u6240\u6709\u4f60\u60f3\u4e0d\u8ba9root\u767b\u5f55\u7684tty\u8bbe\u5907\u3002<\/p>\n\n\n\n<p>tty\u5c31\u662ftty\uff0c\u662f\u4e00\u4e2a\u5f88\u5bbd\u6cdb\u7684\u540d\u8bcd\uff0c\u5b83\u662fTeletype\u7684\u7f29\u5199<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u6307\u7684\u662f\/dev\/tty\uff0c\u90a3\u6307\u5f53\u524d\u7ec8\u7aef&nbsp;&nbsp;<\/p>\n\n\n\n<p>pts\u662fpesudotty slave\uff0c\u662f\u4f2a\u7ec8\u7aef\u7684slave\u7aef&nbsp;&nbsp;console\u597d\u50cf\u662f\u6307\u5f53\u524d\u7684\u63a7\u5236\u53f0\uff08\u6216\u8005\u76d1\u89c6\u5668\uff09\uff0c\u6bd4\u5982\u8bf4\u4f60Ctrl+Alt+x\uff0c\u7136\u540eecho \"123\" &gt; \/dev\/console\uff0c123\u603b\u4f1a\u663e\u793a\u5728\u4f60\u7684monitor\u4e0a\u3002<\/p>\n\n\n\n<p>vc\u662fvirtual console\uff0c\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3a\u865a\u62df\u7684\u76d1\u89c6\u5668\uff0c\u5f53\u4f60Ctrl+Alt+x\uff0c\u5c31\u4f1a\u5207\u6362\u5230vc x\uff0c\u5728\/dev\u4e0b\u9762\u6ca1\u6709\u76f4\u63a5\u5bf9\u5e94\u7684\u8bbe\u5907\u6587\u4ef6\uff0c\u4e0d\u8fc7\u4f60\u5982\u679c\u5c1d\u8bd5&nbsp;echo \"123\" &gt; \/dev\/vcs1,&nbsp;\u4f60\u5728monitor\u4e0a\u4e5f\u80fd\u770b\u5230\uff0c\u4e0d\u8fc7\u8981\u5207\u6362\u5230\u5bf9\u5e94\u7684vc\u3002<\/p>\n\n\n\n<p>vt\u6307\u7684\u662fvirtual terminal\uff0c\u865a\u62df\u7ec8\u7aef\uff0c\u5728\u6211\u770b\u6765\u6307\u7684\u5c31\u662f\u865a\u62df\u63a7\u5236\u53f0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%BC%80%E5%90%AFtelnet%E7%9A%84root%E7%99%BB%E5%BD%95\"><\/span>\u5f00\u542ftelnet\u7684root\u767b\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u628a\/etc\/securetty\u6587\u4ef6\u4e2d\u7684pts0 - pts3\u5168\u90e8\u6ce8\u91ca\u6389\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n\n\n\n<p>\u5141\u8bb8root\u7528\u6237telnet\u767b\u5f55\u5219\u9700\u8981\u6dfb\u52a0\u4e0apst\u7c7b\u578b\u7684\u7ec8\u7aef\u3002<\/p>\n\n\n\n<p>\u5982\u542f\u52a8telnet\u670d\u52a1\u540e\uff0croot\u7528\u6237\u767b\u5f55\u62a5\u5982\u4e0b\u9519\u8bef\uff0c\u9700\u8981\u6309\u7167\u4e0a\u8ff0\u65b9\u5f0f\u8fdb\u884c\u8c03\u6574<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># telnet 192.168.56.123\nTrying 192.168.56.123...\nConnected to 192.168.56.123.\nEscape character is '^]'.\n\nKernel 3.10.0-514.el7.x86_64 on an x86_64\n#localhost login: root\nPassword: \nLogin incorrect\n<\/code><\/pre>\n\n\n\n<p>\u8c03\u6574\u5b8c\u6210\u540e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># telnet192.168.56.123\n#localhost login: root\nPassword: \n\u767b\u5f55\u64cd\u4f5c\u7cfb\u7edf\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9F%A5%E7%9C%8Bopenssh%E5%92%8Copenssl%E7%89%88%E6%9C%AC\"><\/span>\u67e5\u770bopenssh\u548copenssl\u7248\u672c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># ssh -V\nOpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013\n\n# openssl version\nOpenSSL 1.0.1e-fips 11 Feb 2013\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%A4%87%E4%BB%BD%E5%B9%B6%E7%A7%BB%E9%99%A4%E8%80%81%E6%96%87%E4%BB%B6\"><\/span>\u5907\u4efd\u5e76\u79fb\u9664\u8001\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># mkdir -p \/root\/update\n# cd \/root\/update\n# cp-rp\/etc\/ssh\/sshd_configsshd_config\n# cp -rp \/etc\/pam.d\/sshdsshd\n# cp -rp \/etc\/ssl\/ .\/\n# cp -rp \/usr\/bin\/opensslopenssl\n# cp -rp \/etc\/ssh \/root\/update\nmv \/usr\/bin\/openssl \/usr\/bin\/openssl_bak\n\n# yum remove openssl-devel\n# rm -rf \/etc\/ssl\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%AE%89%E8%A3%85%E4%BE%9D%E8%B5%96%E5%8C%85\"><\/span>\u5b89\u88c5\u4f9d\u8d56\u5305<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># yum install gcc\n# yum install gcc-c++ \n# yum install glibc\n# yum install make\n# yum installautoconf\n# yum installpcre-devel\n# yum install pam-devel\n# yum install zlib-devel.x86_64\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%A7%A3%E5%8E%8B%E5%B9%B6%E5%AE%89%E8%A3%85openssl%E5%8C%85\"><\/span>\u89e3\u538b\u5e76\u5b89\u88c5openssl\u5305<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%A7%A3%E5%8E%8B\"><\/span>\u89e3\u538b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># tar -xvf openssl-1.1.1j.tar.gz\n# cd openssl-1.1.1j<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E9%85%8D%E7%BD%AE\"><\/span>\u914d\u7f6e<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># .\/config  --prefix=\/usr\/local --openssldir=\/usr\/local\/ssl\nOperating system: x86_64-whatever-linux2\nConfiguring OpenSSL version 1.1.1j (0x101010afL) for linux-x86_64\nUsing os-specific seed configuration\nCreating configdata.pm\nCreating Makefile\n\n**********************************************************************\n***                                                                ***\n***   OpenSSL has been successfully configured                     ***\n***                                                                ***\n***   If you encounter a problem while building, please open an    ***\n***   issue on GitHub &lt;https:\/\/github.com\/openssl\/openssl\/issues&gt;  ***\n***   and include the output from the following command:           ***\n***                                                                ***\n***       perl configdata.pm --dump                                ***\n***                                                                ***\n***   (If you are new to OpenSSL, you might want to consult the    ***\n***   'Troubleshooting' section in the INSTALL file first)         ***\n***                                                                ***\n**********************************************************************\n# echo $? -- \u68c0\u67e5\u914d\u7f6e\u662f\u5426\u6210\u529f<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85\"><\/span>\u7f16\u8bd1\u5b89\u88c5<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># make&amp;&amp; make install\n# echo $? -- \u68c0\u67e5\u7f16\u8bd1\u5b89\u88c5\u662f\u5426\u6210\u529f\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%90%8E%E7%BB%AD\"><\/span>\u540e\u7eed<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># ln -s \/usr\/local\/bin\/openssl \/usr\/bin\/openssl\n# ln -s \/usr\/local\/include\/openssl \/usr\/include\/openssl\n\n# cat \/etc\/ld.so.conf\nincludeld.so.conf.d\/*.conf\n\n# echo \"\/usr\/local\/lib\" &gt;&gt; \/etc\/ld.so.conf\n# echo \"\/usr\/local\/lib64\" &gt;&gt; \/etc\/ld.so.conf\n# cat \/etc\/ld.so.conf\nincludeld.so.conf.d\/*.conf\n\/usr\/local\/lib\n\/usr\/local\/lib64\n\n# \/sbin\/ldconfig\n# openssl version\nOpenSSL 1.1.1j  16 Feb 2021\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%A7%A3%E5%8E%8B%E5%B9%B6%E5%AE%89%E8%A3%85openssh%E5%8C%85\"><\/span>\u89e3\u538b\u5e76\u5b89\u88c5openssh\u5305<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># rm -rf \/etc\/ssh\n# cd \/root\/update\n\n# tar -xvf openssh-8.5p1.tar.gz\n# cdopenssh-8.5p1\n\n# .\/configure --prefix=\/usr\/ --sysconfdir=\/etc\/ssh  --with-openssl-includes=\/usr\/local\/ssl\/include --with-ssl-dir=\/usr\/local\/ssl   --with-zlib   --with-md5-passwords   --with-pam\n# echo $? -- \u68c0\u67e5\u914d\u7f6e\u662f\u5426\u6210\u529f\n\n# make clean\n# make&amp;&amp; make install\n# echo $? -- \u68c0\u67e5\u5b89\u88c5\u662f\u5426\u6210\u529f\n\n# cp -afcontrib\/redhat\/sshd.init \/etc\/init.d\/sshd\n# cp -afcontrib\/redhat\/sshd.pam \/etc\/pam.d\/sshd.pam\n# chmod +x \/etc\/init.d\/sshd\n\n# echo \" HostKey \/etc\/ssh\/ssh_host_rsa_key \"&gt;&gt;\/etc\/ssh\/sshd_config\n#echo \"HostKey \/etc\/ssh\/ssh_host_ecdsa_key\"&gt;&gt;\/etc\/ssh\/sshd_config\n# echo \"HostKey \/etc\/ssh\/ssh_host_ed25519_key\"&gt;&gt;\/etc\/ssh\/sshd_config\n# echo\"PermitRootLogin yes\"&gt;&gt;\/etc\/ssh\/sshd_config\n# echo\"PasswordAuthentication yes\"&gt;&gt;\/etc\/ssh\/sshd_config\n# echo\"ChallengeResponseAuthentication no\"&gt;&gt;\/etc\/ssh\/sshd_config\n# echo\"UsePAM yes\"&gt;&gt;\/etc\/ssh\/sshd_config\n# echo\"X11Forwarding yes\"&gt;&gt;\/etc\/ssh\/sshd_config\n\n# chkconfig --add sshd\n# systemctl list-unit-files sshd.service\nUNIT FILE    STATE  \nsshd.service enabled\n\n1 unit files listed.\n\n# mv \/usr\/lib\/systemd\/system\/sshd.service \/root\/update\/sshd.service\n# chkconfigsshd on\nNote: Forwarding request to 'systemctl enable sshd.socket'.\nCreated symlink from \/etc\/systemd\/system\/sockets.target.wants\/sshd.socket to \/usr\/lib\/systemd\/system\/sshd.socket.\n\n# systemctl enable sshd\nsshd.service is not a native service, redirecting to \/sbin\/chkconfig.\nExecuting \/sbin\/chkconfigsshd on\nNote: Forwarding request to 'systemctl enable sshd.socket'.\n\n# systemctl start sshd\n# ssh -V\nOpenSSH_8.5p1, OpenSSL 1.1.1j  16 Feb 2021\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%AE%A9SHA1%E7%BB%A7%E7%BB%AD%E5%8F%AF%E7%94%A8%E7%9A%84%E6%96%B9%E6%B3%95\"><\/span>\u8ba9SHA1\u7ee7\u7eed\u53ef\u7528\u7684\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5728sshd\u914d\u7f6e\u6587\u4ef6\u91cc\u589e\u52a0\u8fd9\u4e2a\u8ba4\u8bc1\u65b9\u6cd5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HostKeyAlgorithms ssh-rsa<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecd\u5728redhat 7\u4e0a\u5347\u7ea7openssh 8.5 p1\u7684\u65b9\u6cd5\uff0c\u5305\u62ecopenssl\u7684\u4f9d\u8d56\u5347\u7ea7\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[93,72],"class_list":["post-5282","post","type-post","status-publish","format-standard","hentry","category-1","tag-93","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/5282","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=5282"}],"version-history":[{"count":10,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/5282\/revisions"}],"predecessor-version":[{"id":12427,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/5282\/revisions\/12427"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=5282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=5282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=5282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}