{"id":31920,"date":"2025-04-22T14:41:00","date_gmt":"2025-04-22T06:41:00","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/31920.html"},"modified":"2025-04-22T14:41:00","modified_gmt":"2025-04-22T06:41:00","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85openssh9-9p1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/31920.html","title":{"rendered":"\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1"},"content":{"rendered":"<p>11.81.2.19<\/p>\n<h3>\u66f4\u65b0 SSL<\/h3>\n<li>\u5907\u4efd\u539f\u6709\u914d\u7f6e<\/li>\n<p>1.1 \u67e5\u770b openssl \u7248\u672c<\/p>\n<p>openssl version<\/p>\n<p>OpenSSL 1.0.2k-fips  26 Jan 2017<\/p>\n<p>1.2 \u67e5\u770b openssl \u8def\u5f84<\/p>\n<p>whereis openssl<\/p>\n<p>openssl: \/usr\/bin\/openssl \/usr\/lib64\/openssl \/usr\/include\/openssl \/usr\/share\/man\/man1\/openssl.1ssl.gz<\/p>\n<p>1.3 \u5907\u4efd openssl \u6587\u4ef6<\/p>\n<p>cp \/usr\/bin\/openssl \/usr\/bin\/openssl_old cp -r \/usr\/include\/openssl \/usr\/include\/openssl_old<\/p>\n<li>\u4e0b\u8f7d\u65b0 openssl \u6587\u4ef6<\/li>\n<p>\u4e0b\u8f7d\u5730\u5740&#xff1a;https:\/\/openssl-library.org\/source\/index.html \u9009\u62e9\u7684\u7248\u672c\u662f openssl-3.0.15.tar.gz&#xff0c;\u957f\u671f\u652f\u6301\u7248\u672c&#xff0c;\u652f\u6301\u5230 2026\u5e74 7\u6708 \u4e0a\u4f20\u5230\u670d\u52a1\u5668&#xff1a; \/data\/soft<\/p>\n<li>\u5347\u7ea7 openssl<\/li>\n<p>3.1 \u89e3\u538b\u5e76\u8fdb\u5165<\/p>\n<p>tar -zxvf openssl-3.0.15.tar.gz cd openssl-3.0.15.tar.gz<\/p>\n<p>3.2 \u914d\u7f6e openssl \u5b89\u88c5\u76ee\u5f55<\/p>\n<p>.\/config &#8211;prefix&#061;\/usr\/local\/openssl<\/p>\n<p>Can&#039;t locate IPC\/Cmd.pm in &#064;INC (&#064;INC contains: \/data\/soft\/openssl-3.0.15\/util\/perl \/usr\/local\/lib64\/perl5 \/usr\/local\/share\/perl5 \/usr\/lib64\/perl5\/vendor_perl \/usr\/share\/perl5\/vendor_perl \/usr\/lib64\/perl5 \/usr\/share\/perl5 . \/data\/soft\/openssl-3.0.15\/external\/perl\/Text-Template-1.56\/lib) at \/data\/soft\/openssl-3.0.15\/util\/perl\/OpenSSL\/config.pm line 19.<br \/>\nBEGIN failed&#8211;compilation aborted at \/data\/soft\/openssl-3.0.15\/util\/perl\/OpenSSL\/config.pm line 19.<br \/>\nCompilation failed in require at \/data\/soft\/openssl-3.0.15\/Configure line 23.<br \/>\nBEGIN failed&#8211;compilation aborted at \/data\/soft\/openssl-3.0.15\/Configure line 23.<\/p>\n<p>\u62a5\u9519\u89e3\u51b3\u65b9\u6848&#xff1a; \u65b9\u6848\u4e00&#xff1a;\u4f7f\u7528 perl-CPAN \u5b89\u88c5\u4f9d\u8d56\u3010\u4e0d\u63a8\u8350\u3011 1&#xff09;\u5b89\u88c5perl-CPAN<\/p>\n<p>yum install -y perl-CPAN<\/p>\n<p>2&#xff09;\u8fdb\u5165CPAN\u7684shell\u6a21\u5f0f \u6ce8\u610f&#xff1a;\u9996\u6b21\u8fdb\u5165\u9700\u8981\u914d\u7f6eshell&#xff0c;\u6309\u7167\u63d0\u793a\u64cd\u4f5c\u5373\u53ef&#xff0c;\u6211\u8fd9\u91cc\u662f\u4e00\u8def\u56de\u8f66&#xff0c;\u5b89\u88c5\u9700\u8981\u4e00\u5b9a\u65f6\u95f4<\/p>\n<p>perl -MCPAN -e shell \u3010\u65e5\u5fd7\u89c1\u96441\u3011<\/p>\n<p>3&#xff09;\u5728shell\u4e2d\u5b89\u88c5\u7f3a\u5c11\u7684\u6a21\u5757 cpan[1]&gt; install IPC\/Cmd.pm \u3010\u65e5\u5fd7\u89c1\u96442&#xff0c;\u672a\u5b8c\u6210&#xff0c;\u6362yum\u76f4\u63a5\u5b89\u88c5\u65b9\u5f0f\u3011<\/p>\n<p>\u65b9\u6848\u4e8c&#xff1a;\u4f7f\u7528 yum \u5b89\u88c5\u4f9d\u8d56 \u6216\u8005yum\u547d\u4ee4\u5b89\u88c5perl-IPC\/Cmd \u3010\u66f4\u5feb\u3011&#xff1a; yum -y install zlib* perl pam* gcc* perl-IPC-Cmd \u3010\u65e5\u5fd7\u89c1\u96443\u3011<\/p>\n<p>\u5b89\u88c5\u6210\u529f\u540e&#xff0c;\u518d\u6b21\u7f16\u8bd1OpenSSL\u5c31\u6210\u529f\u5566<\/p>\n<p>.\/config &#8211;prefix&#061;\/usr\/local\/openssl<\/p>\n<p>Configuring OpenSSL version 3.0.15 for target linux-x86_64<br \/>\nUsing os-specific seed configuration<br \/>\nCreated configdata.pm<br \/>\nRunning configdata.pm<br \/>\nCreated Makefile.in<br \/>\nCreated Makefile<br \/>\nCreated include\/openssl\/configuration.h<\/p>\n<p>**********************************************************************<br \/>\n***                                                                ***<br \/>\n***   OpenSSL has been successfully configured                     ***<br \/>\n***                                                                ***<br \/>\n***   If you encounter a problem while building, please open an    ***<br \/>\n***   issue on GitHub &lt;https:\/\/github.com\/openssl\/openssl\/issues&gt;  ***<br \/>\n***   and include the output from the following command:           ***<br \/>\n***                                                                ***<br \/>\n***       perl configdata.pm &#8211;dump                                ***<br \/>\n***                                                                ***<br \/>\n***   (If you are new to OpenSSL, you might want to consult the    ***<br \/>\n***   &#039;Troubleshooting&#039; section in the INSTALL.md file first)      ***<br \/>\n***                                                                ***<br \/>\n**********************************************************************<\/p>\n<p>3.3 \u7f16\u8bd1&amp;&amp;\u5b89\u88c5<\/p>\n<p>make &amp;&amp; make install \u9700\u8981\u4e00\u5b9a\u7684\u65f6\u95f4<\/p>\n<p>3.4 \u521b\u5efa\u8f6f\u8fde\u63a5 \u8bf4\u660e&#xff1a;\u521b\u5efa\u7684\u8f6f\u94fe\u63a5\u548c\u4e4b\u524d\u6ca1\u5347\u7ea7\u901a\u8fc7whereis openssl\u4fdd\u6301\u4e00\u81f4\u5373\u53ef\u3002<\/p>\n<p>mv \/usr\/bin\/openssl \/usr\/bin\/openssl_bak ln -s \/usr\/local\/openssl\/bin\/openssl \/usr\/bin\/openssl mv \/usr\/include\/openssl \/usr\/include\/openssl_bak ln -s \/usr\/local\/openssl\/include\/openssl \/usr\/include\/openssl<\/p>\n<p>3.5 \u6dfb\u52a0\u52a8\u6001\u94fe\u63a5\u5e93\u6570\u636e<\/p>\n<p>cat \/etc\/ld.so.conf<\/p>\n<p>include ld.so.conf.d\/*.conf<\/p>\n<p>echo \u201c\/usr\/local\/openssl\/lib64\/\u201d &gt;&gt; \/etc\/ld.so.conf cat \/etc\/ld.so.conf<\/p>\n<p>include ld.so.conf.d\/*.conf<br \/>\n\/usr\/local\/openssl\/lib64\/<\/p>\n<p>3.6 \u66f4\u65b0\u52a8\u6001\u94fe\u63a5\u5e93<\/p>\n<p>ldconfig -v<\/p>\n<p>4 \u9a8c\u8bc1 openssl \u7248\u672c \u8bf4\u660e&#xff1a;-a\u53c2\u6570\u80fd\u663e\u793a\u66f4\u5b8c\u6574\u7684\u4fe1\u606f<\/p>\n<p>openssl version -a<\/p>\n<p>\u66f4\u65b0\u5b8c\u6210<\/p>\n<h3>\u5347\u7ea7 openSSH<\/h3>\n<li>\u68c0\u67e5\u7248\u672c<\/li>\n<p>ssh -V OpenSSH_8.0p1, OpenSSL 1.0.2k-fips 26 Jan 2017<\/p>\n<li>\n<p>\u4e0b\u8f7d\u65b0\u7248\u672c \u4e0b\u8f7d\u5730\u5740&#xff1a;https:\/\/cdn.openbsd.org\/pub\/OpenBSD\/OpenSSH\/portable\/ \u9009\u62e9\u7248\u672c openssh-9.9p1.tar.gz \u4e0a\u4f20\u5230\u670d\u52a1\u5668&#xff1a; \/data\/soft<\/p>\n<\/li>\n<li>\n<p>\u89e3\u538b\u5e76\u8fdb\u5165<\/p>\n<\/li>\n<p>tar -zxvf openssh-9.9p1.tar.gz cd openssh-9.9p1<\/p>\n<li>\u5b89\u88c5\u4f9d\u8d56<\/li>\n<p>yum -y install gcc pam-devel zlib-devel openssl-devel net-tools<\/p>\n<p>Package gcc-4.8.5-39.el7.ns7.01.x86_64 already installed and latest version<br \/>\nPackage pam-devel-1.1.8-22.el7.x86_64 already installed and latest version<br \/>\nPackage zlib-devel-1.2.7-18.el7.x86_64 already installed and latest version<br \/>\nPackage 1:openssl-devel-1.0.2k-21.el7_9.ns7.01.x86_64 already installed and latest version<br \/>\nPackage net-tools-2.0-0.24.20131004git.el7.ns7.01.x86_64 already installed and latest version<br \/>\nNothing to do<\/p>\n<li>\u5907\u4efd\u539f\u59cb\u6587\u4ef6<\/li>\n<p>cp -r -a \/etc\/ssh\/ \/etc\/ssh.bak<\/p>\n<p>cp -r -a \/etc\/pam.d\/ \/etc\/pam.d.bak<\/p>\n<p>cp -r -a \/usr\/sbin\/sshd \/usr\/sbin\/sshd.bak<\/p>\n<p>cp -r -a \/usr\/bin\/ssh \/usr\/bin\/ssh.bak<\/p>\n<p>cp -r -a \/usr\/bin\/ssh-keygen \/usr\/bin\/ssh-keygen.bak<\/p>\n<li>\u5378\u8f7d\u539f\u7cfb\u7edf\u7684openssh\u5305<\/li>\n<p>rpm -e &#8211;nodeps rpm -qa | grep openssh<\/p>\n<li>\u7f16\u8bd1\u5b89\u88c5openssh\u3010\u6ce8\u610f&#xff0c;\u6b64\u6b65\u9aa4\u4e4b\u540e\u4e0d\u80fd\u65ad\u5f00\u8fde\u63a5&#xff0c;\u76f4\u5230\u914d\u7f6e\u5b8c\u6210\u624d\u80fd\u5efa\u7acb\u65b0\u8fde\u63a5\u3011<\/li>\n<p>\u6ce8\u610f\u4fee\u6539 ssl \u76ee\u5f55\u4e3a\u5148\u524d\u914d\u7f6e\u7684\u76ee\u5f55<\/p>\n<p>.\/configure &#8211;prefix&#061;\/usr\/local\/openssh-9.9p1 &#8211;sysconfdir&#061;\/etc\/ssh &#8211;with-pam &#8211;with-ssl-dir&#061;\/usr\/local\/openssl &#8211;with-md5-passwords &#8211;with-zlib<\/p>\n<p>make &amp;&amp; make install<\/p>\n<p>cc -std&#061;gnu11 -o ssh-sk-helper ssh-sk-helper.o ssh-sk.o sk-usbhid.o -L. -Lopenbsd-compat\/ -L\/usr\/local\/openssl\/lib64  -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -pie  -lssh -lopenbsd-compat -lssh -lopenbsd-compat -ldl -lutil  -lresolv  -lcrypto  -lz<br \/>\n\/usr\/bin\/mkdir -p \/usr\/local\/openssh-9.9p1\/bin<br \/>\n\/usr\/bin\/mkdir -p \/usr\/local\/openssh-9.9p1\/sbin<br \/>\n\/usr\/bin\/mkdir -p \/usr\/local\/openssh-9.9p1\/share\/man\/man1<br \/>\n\/usr\/bin\/mkdir -p \/usr\/local\/openssh-9.9p1\/share\/man\/man5<br \/>\n\/usr\/bin\/mkdir -p \/usr\/local\/openssh-9.9p1\/share\/man\/man8<br \/>\n\/usr\/bin\/mkdir -p \/usr\/local\/openssh-9.9p1\/libexec<br \/>\n\/usr\/bin\/mkdir -p -m 0755 \/var\/empty<br \/>\n\/usr\/bin\/install -c -m 0755 -s ssh \/usr\/local\/openssh-9.9p1\/bin\/ssh<br \/>\n\/usr\/bin\/install -c -m 0755 -s scp \/usr\/local\/openssh-9.9p1\/bin\/scp<br \/>\n\/usr\/bin\/install -c -m 0755 -s ssh-add \/usr\/local\/openssh-9.9p1\/bin\/ssh-add<br \/>\n\/usr\/bin\/install -c -m 0755 -s ssh-agent \/usr\/local\/openssh-9.9p1\/bin\/ssh-agent<br \/>\n\/usr\/bin\/install -c -m 0755 -s ssh-keygen \/usr\/local\/openssh-9.9p1\/bin\/ssh-keygen<br \/>\n\/usr\/bin\/install -c -m 0755 -s ssh-keyscan \/usr\/local\/openssh-9.9p1\/bin\/ssh-keyscan<br \/>\n\/usr\/bin\/install -c -m 0755 -s sshd \/usr\/local\/openssh-9.9p1\/sbin\/sshd<br \/>\n\/usr\/bin\/install -c -m 0755 -s sshd-session \/usr\/local\/openssh-9.9p1\/libexec\/sshd-session<br \/>\n\/usr\/bin\/install -c -m 4711 -s ssh-keysign \/usr\/local\/openssh-9.9p1\/libexec\/ssh-keysign<br \/>\n\/usr\/bin\/install -c -m 0755 -s ssh-pkcs11-helper \/usr\/local\/openssh-9.9p1\/libexec\/ssh-pkcs11-helper<br \/>\n\/usr\/bin\/install -c -m 0755 -s ssh-sk-helper \/usr\/local\/openssh-9.9p1\/libexec\/ssh-sk-helper<br \/>\n\/usr\/bin\/install -c -m 0755 -s sftp \/usr\/local\/openssh-9.9p1\/bin\/sftp<br \/>\n\/usr\/bin\/install -c -m 0755 -s sftp-server \/usr\/local\/openssh-9.9p1\/libexec\/sftp-server<br \/>\n\/usr\/bin\/install -c -m 644 ssh.1.out \/usr\/local\/openssh-9.9p1\/share\/man\/man1\/ssh.1<br \/>\n\/usr\/bin\/install -c -m 644 scp.1.out \/usr\/local\/openssh-9.9p1\/share\/man\/man1\/scp.1<br \/>\n\/usr\/bin\/install -c -m 644 ssh-add.1.out \/usr\/local\/openssh-9.9p1\/share\/man\/man1\/ssh-add.1<br \/>\n\/usr\/bin\/install -c -m 644 ssh-agent.1.out \/usr\/local\/openssh-9.9p1\/share\/man\/man1\/ssh-agent.1<br \/>\n\/usr\/bin\/install -c -m 644 ssh-keygen.1.out \/usr\/local\/openssh-9.9p1\/share\/man\/man1\/ssh-keygen.1<br \/>\n\/usr\/bin\/install -c -m 644 ssh-keyscan.1.out \/usr\/local\/openssh-9.9p1\/share\/man\/man1\/ssh-keyscan.1<br \/>\n\/usr\/bin\/install -c -m 644 moduli.5.out \/usr\/local\/openssh-9.9p1\/share\/man\/man5\/moduli.5<br \/>\n\/usr\/bin\/install -c -m 644 sshd_config.5.out \/usr\/local\/openssh-9.9p1\/share\/man\/man5\/sshd_config.5<br \/>\n\/usr\/bin\/install -c -m 644 ssh_config.5.out \/usr\/local\/openssh-9.9p1\/share\/man\/man5\/ssh_config.5<br \/>\n\/usr\/bin\/install -c -m 644 sshd.8.out \/usr\/local\/openssh-9.9p1\/share\/man\/man8\/sshd.8<br \/>\n\/usr\/bin\/install -c -m 644 sftp.1.out \/usr\/local\/openssh-9.9p1\/share\/man\/man1\/sftp.1<br \/>\n\/usr\/bin\/install -c -m 644 sftp-server.8.out \/usr\/local\/openssh-9.9p1\/share\/man\/man8\/sftp-server.8<br \/>\n\/usr\/bin\/install -c -m 644 ssh-keysign.8.out \/usr\/local\/openssh-9.9p1\/share\/man\/man8\/ssh-keysign.8<br \/>\n\/usr\/bin\/install -c -m 644 ssh-pkcs11-helper.8.out \/usr\/local\/openssh-9.9p1\/share\/man\/man8\/ssh-pkcs11-helper.8<br \/>\n\/usr\/bin\/install -c -m 644 ssh-sk-helper.8.out \/usr\/local\/openssh-9.9p1\/share\/man\/man8\/ssh-sk-helper.8<br \/>\n\/usr\/bin\/mkdir -p \/etc\/ssh<br \/>\n\/etc\/ssh\/ssh_config already exists, install will not overwrite<br \/>\n\/etc\/ssh\/sshd_config already exists, install will not overwrite<br \/>\n\/etc\/ssh\/moduli already exists, install will not overwrite<br \/>\n\/usr\/local\/openssh-9.9p1\/sbin\/sshd -t -f \/etc\/ssh\/sshd_config<br \/>\n\/etc\/ssh\/sshd_config line 79: Unsupported option GSSAPIAuthentication<br \/>\n\/etc\/ssh\/sshd_config line 80: Unsupported option GSSAPICleanupCredentials<br \/>\n&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;<br \/>\n&#064;         WARNING: UNPROTECTED PRIVATE KEY FILE!          &#064;<br \/>\n&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;<br \/>\nPermissions 0640 for &#039;\/etc\/ssh\/ssh_host_rsa_key&#039; are too open.<br \/>\nIt is required that your private key files are NOT accessible by others.<br \/>\nThis private key will be ignored.<br \/>\nUnable to load host key &#034;\/etc\/ssh\/ssh_host_rsa_key&#034;: bad permissions<br \/>\nUnable to load host key: \/etc\/ssh\/ssh_host_rsa_key<br \/>\n&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;<br \/>\n&#064;         WARNING: UNPROTECTED PRIVATE KEY FILE!          &#064;<br \/>\n&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;<br \/>\nPermissions 0640 for &#039;\/etc\/ssh\/ssh_host_ecdsa_key&#039; are too open.<br \/>\nIt is required that your private key files are NOT accessible by others.<br \/>\nThis private key will be ignored.<br \/>\nUnable to load host key &#034;\/etc\/ssh\/ssh_host_ecdsa_key&#034;: bad permissions<br \/>\nUnable to load host key: \/etc\/ssh\/ssh_host_ecdsa_key<br \/>\n&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;<br \/>\n&#064;         WARNING: UNPROTECTED PRIVATE KEY FILE!          &#064;<br \/>\n&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;<br \/>\nPermissions 0640 for &#039;\/etc\/ssh\/ssh_host_key&#039; are too open.<br \/>\nIt is required that your private key files are NOT accessible by others.<br \/>\nThis private key will be ignored.<br \/>\nUnable to load host key &#034;\/etc\/ssh\/ssh_host_key&#034;: bad permissions<br \/>\nUnable to load host key: \/etc\/ssh\/ssh_host_key<br \/>\nsshd: no hostkeys available &#8212; exiting.<br \/>\nmake: [check-config] Error 1 (ignored)<br \/>\nmake: warning:  Clock skew detected.  Your build may be incomplete.<\/p>\n<li>\u590d\u5236\u65b0\u914d\u7f6e\u5230\u539f\u6765\u7684\u76ee\u5f55<\/li>\n<p>cp \/usr\/local\/openssh-9.9p1\/sbin\/sshd \/usr\/sbin\/sshd \u4f1a\u62a5 cp: cannot create regular file \u2018\/usr\/sbin\/sshd\u2019: Text file busy \u53ef\u4ee5\u5148 &gt; mv \/usr\/sbin\/sshd \/usr\/sbin\/sshd.bak \u7136\u540e\u518d\u6267\u884c<\/p>\n<p>cp \/usr\/local\/openssh-9.9p1\/bin\/ssh \/usr\/bin\/ssh<\/p>\n<p>cp \/usr\/local\/openssh-9.9p1\/bin\/ssh-keygen \/usr\/bin\/ssh-keygen<\/p>\n<p>cp -p contrib\/redhat\/sshd.init \/etc\/init.d\/sshd<\/p>\n<p>\u6211\u88c5\u5b8c\u8fd9\u4e2a\u5df2\u7ecf\u5728\u91cc\u9762\u4e86&#xff0c;\u5982\u679c\u6ca1\u6709\u5219\u590d\u5236\u4e00\u4e0b<\/p>\n<p>cp \/usr\/local\/openssh-9.9p1\/etc\/sshd_config \/etc\/ssh\/sshd_config<\/p>\n<li>\u4fee\u6539\u914d\u7f6e(\u91cd\u8981)<\/li>\n<p>chmod &#043;x \/etc\/init.d\/sshd<\/p>\n<p>vim \/etc\/ssh\/sshd_config<\/p>\n<p>\u5c06\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fd9\u51e0\u4e2a\u6539\u4e3ayes&#xff1a;<\/p>\n<ul>\n<li>PermitRootLogin yes<\/li>\n<li>PubkeyAuthentication yes<\/li>\n<li>PasswordAuthentication yes<\/li>\n<\/ul>\n<p>\u8bf4\u660e&#xff1a; PermitRootLogin yes&#xff1a;\u5141\u8bb8root\u7528\u6237\u901a\u8fc7SSH\u767b\u5f55\u5230\u7cfb\u7edf&#xff08;\u6700\u6700\u6700\u91cd\u8981\u8fd9\u4e2a\u4e00\u5b9a\u8981\u8bbe\u7f6e&#xff0c;\u4e0d\u7136\u4f60\u91cd\u542fsshd\u670d\u52a1\u4e4b\u540e\u5c31\u4e0d\u80fd\u8fdc\u7a0b\u8fde\u63a5\u4e86&#xff09; PubkeyAuthentication yes&#xff1a;\u542f\u7528\u516c\u94a5\u8eab\u4efd\u9a8c\u8bc1 PasswordAuthentication yes&#xff1a;\u542f\u7528\u5bc6\u7801\u8eab\u4efd\u9a8c\u8bc1<\/p>\n<li>\u5f00\u673a\u81ea\u542f<\/li>\n<p>systemctl enable sshd<\/p>\n<li>\u91cd\u542f sshd<\/li>\n<p>systemctl restart sshd<\/p>\n<p>\u62a5\u9519<\/p>\n<p>Job for sshd.service failed because the control process exited with error code. See &#034;systemctl status sshd.service&#034; and &#034;journalctl -xe&#034; for details.<\/p>\n<p>\u67e5\u770b\u9519\u8bef<br \/>\nsystemctl status sshd.service<br \/>\n\u25cf sshd.service &#8211; OpenSSH server daemon<br \/>\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/sshd.service; enabled; vendor preset: enabled)<br \/>\n   Active: activating (auto-restart) (Result: exit-code) since Fri 2024-09-20 03:49:26 CST; 16s ago<br \/>\n     Docs: man:sshd(8)<br \/>\n           man:sshd_config(5)<br \/>\n  Process: 83036 ExecStart&#061;\/usr\/sbin\/sshd -D $OPTIONS (code&#061;exited, status&#061;1\/FAILURE)<br \/>\n Main PID: 83036 (code&#061;exited, status&#061;1\/FAILURE)<\/p>\n<p>Sep 20 03:49:26  sshd[83036]: &#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;&#064;<br \/>\nSep 20 03:49:26  sshd[83036]: Permissions 0640 for &#039;\/etc\/ssh\/ssh_host_key&#039; are too open.<br \/>\nSep 20 03:49:26  sshd[83036]: It is required that your private key files are NOT accessible by others.<br \/>\nSep 20 03:49:26  sshd[83036]: This private key will be ignored.<br \/>\nSep 20 03:49:26  sshd[83036]: Unable to load host key &#034;\/etc\/ssh\/ssh_host_key&#034;: bad permissions<br \/>\nSep 20 03:49:26  sshd[83036]: Unable to load host key: \/etc\/ssh\/ssh_host_key<br \/>\nSep 20 03:49:26  sshd[83036]: sshd: no hostkeys available &#8212; exiting.<br \/>\nSep 20 03:49:26  systemd[1]: Failed to start OpenSSH server daemon.<br \/>\nSep 20 03:49:26  systemd[1]: Unit sshd.service entered failed state.<br \/>\nSep 20 03:49:26  systemd[1]: sshd.service failed.<\/p>\n<p>\u89e3\u51b3\u65b9\u6848 \u4fee\u6539\u76ee\u5f55\u6743\u9650<\/p>\n<p>chmod -R 600 \/etc\/ssh<\/p>\n<p>\u518d\u6b21\u91cd\u542f\u670d\u52a1<\/p>\n<p>systemctl restart sshd<\/p>\n<li>\u68c0\u67e5\u7248\u672c<\/li>\n<p>sshd -V<\/p>\n<p>\u53e6\u5efa\u7acb\u4e00\u4e2a\u65b0\u4f1a\u8bdd&#xff0c;\u67e5\u770b\u8fde\u63a5\u662f\u5426\u6b63\u5e38\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf17\u6b21\u3002openssh\uff0copenssl\u5347\u7ea7\u5b89\u88c5_openssh-9.9p1.tar.gz<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,44],"topic":[],"class_list":["post-31920","post","type-post","status-publish","format-standard","hentry","category-server","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/31920.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf17\u6b21\u3002openssh\uff0copenssl\u5347\u7ea7\u5b89\u88c5_openssh-9.9p1.tar.gz\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/31920.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-22T06:41:00+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/31920.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/31920.html\",\"name\":\"\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-22T06:41:00+00:00\",\"dateModified\":\"2025-04-22T06:41:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/31920.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/31920.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/31920.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/31920.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf17\u6b21\u3002openssh\uff0copenssl\u5347\u7ea7\u5b89\u88c5_openssh-9.9p1.tar.gz","og_url":"https:\/\/www.wsisp.com\/helps\/31920.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-22T06:41:00+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/31920.html","url":"https:\/\/www.wsisp.com\/helps\/31920.html","name":"\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-22T06:41:00+00:00","dateModified":"2025-04-22T06:41:00+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/31920.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/31920.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/31920.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u5b89\u88c5openssh9.9p1"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/31920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=31920"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/31920\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=31920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=31920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=31920"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=31920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}