麒麟Kylin-V10SP2升级OpenSSH9.7p1
基于开源工具,将麒麟Kylin-V10SP2的OpenSSH版本升级至9.7p1
测试环境
Kylin-Server-10-SP2-x86-Release-Build09-20210524.iso
Virtual Box,2 vCPU, 4G RAM, 40 vDisk,最小安装.
开源工具
https://github.com/boypt/openssh-rpms
自动编译编译成RPM包,支持多款国产操作系统,如欧拉,龙蜥,统信。
安装依赖
yum install -y rpm-build zlib-devel openssl-devel gcc perl-devel pam-devel libXt-devel gtk2-devel make perl imake
安装步骤
下载
./pullsrc.sh
编译
./pullsrc.sh
安装
cd /root/openssh-rpms-main/el7/RPMS/x86_64
yum localinstall -y *.rpm
chmod -v 600 /etc/ssh/ssh_host_*_key
ssh -V
[root@node ~]# ssh -V
OpenSSH_9.7p1, OpenSSL 3.0.13 30 Jan 2024
配置/sshd_config
vi /etc/ssh/sshd_config
SyslogFacility AUTHPRIV
PermitRootLogin yes
PasswordAuthentication yes
UseDNS no
重启服务
systemctl restart sshd
systemctl status sshd
测试验证
退出并重新登录
注意事项
麒麟自带OpenSSH支持国密算法,升级后不再支持。生产环境请谨慎考虑。
[root@node ~]# ssh -V
OpenSSH_8.2p1, OpenSSL 1.1.1f 31 Mar 2020
[root@node ~]# ssh -Q cipher
sm4-cbc
sm4-ctr
sm4
[root@node ~]# openssl ciphers -v | grep SM
SM2-SM4-CBC-SM3 SSLv3 Kx=SM2 Au=SM2 Enc=SM4 Mac=SM3