[Server security] Upgrade OpenSSH, OpenSSL, disable NTP, and opensshntp

Source: Internet
Author: User
Tags install openssl openssl version

[Server security] Upgrade OpenSSH, OpenSSL, disable NTP, and opensshntp

The company's old live video server uses CentOS 6.7, and many software packages were generated several years ago. Recently, many security-related news flood the it circle. First, Intel chips have major security vulnerabilities, followed by MacOS security vulnerabilities. Therefore, security issues cannot be underestimated.

In the next task, we had some related experience in the previous Huawei core network project, most of which were nothing more than configuring or upgrading the software package. After a morning of hard work, we finally completed the preparation of the upgrade package. Linux is convenient.

Update. sh:

#!/bin/bash#stop ntpservice ntpd stopchkconfig --list ntpdchkconfig ntpd off#install openssl-flipsudo tar xzvf openssl-fips-2.0.16.tar.gzcd openssl-fips-2.0.16sudo ./configsudo makesudo make installcd ..#install sslsudo tar xzvf openssl-1.0.2n.tar.gzcd openssl-1.0.2nsudo ./config fips --sharedsudo makesudo make installsudo mv /usr/bin/openssl /usr/bin/openssl.OFFsudo mv /usr/include/openssl /usr/include/openssl.OFFsudo ln -s /usr/local/ssl/bin/openssl /usr/bin/opensslsudo ln -s /usr/local/ssl/include/openssl /usr/include/opensslsudo echo "/usr/local/ssl/lib" >>/etc/ld.so.confsudo /sbin/ldconfig -vsudo openssl version -acd ..#update sshsudo tar xzvf openssh-7.6p1.tar.gz cd openssh-7.6p1sudo ./configure --prefix=/usr/ --sysconfdir=/etc/ssh --with-zlib --with-ssl-dir=/usr/local/ssl --with-md5-passwords --mandir=/usr/share/mansudo makesudo make installsudo sed -i 's/#Protocol 2,1/Protocol 2,1/g' /etc/ssh/sshd_configsudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_configsudo sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_configsudo sed -i 's/#StrictModes yes/StrictModes yes/g' /etc/ssh/sshd_configsudo service sshd restart

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.