# 编译安装openssl-fips cd ./openssl-fips-2.0.16/ ./config && make && make install
# 编译安装openssl cd ../openssl-1.0.2s/ ./config fips shared -fPIC make depend make && make install ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl ln -s /usr/local/ssl/include/openssl /usr/include/openssl echo"/usr/local/ssl/lib" >> /etc/ld.so.conf /sbin/ldconfig # 查看版本是否升级成功 openssl version
# 编译安装openssh cd ../openssh-8.0p1 ./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 && make && make install # 修改ssh配置文件,修改PermitRootLogin为yes UseDNS为no vi /etc/ssh/sshd_config cp -a contrib/redhat/sshd.init /etc/init.d/sshd cp -a contrib/redhat/sshd.pam /etc/pam.d/sshd.pam chmod +x /etc/init.d/sshd chkconfig --add sshd systemctl enable sshd # 使用命令测试端口是否正常 systemctl stop sshd netstat -lntp systemctl start sshd netstat -lntp