Get the App
SLTechnology News&Howtos  ›  Servers  › 

Making rpm package by openssh8.1

Shulou Source: shulou.com Published: 2022-06-03 06:18:22 10月03日 Update

Due to the vulnerability of ssh scanned by security, it is relatively slow to upgrade ssh one by one to compile and install. Therefore, it is convenient to install and use the source code package into a rpm package.

Download the source package

Wget https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.1p1.tar.gzwget http://ftp.riken.jp/Linux/momonga/6/Everything/SOURCES/x11-ssh-askpass-1.2.4.1.tar.gz makes packages for system 6, on system 6, and packages for system 7. Make it on the 7 system and download the related dependency package yum install rpm-build zlib-devel openssl-devel gcc perl-devel pam-devel unzip-y

4. Create the required directory

Mkdir-p / root/rpmbuild/ {SOURCES,SPECS} copy the required packages to cp openssh-8.1p1.tar.gz x11-ssh-askpass-1.2.4.1.tar.gz / root/rpmbuild/SOUR/SPECS/CEStar xf openssh-8.1p1.tar.gz cp openssh-8.1p1/contrib/redhat/openssh.spec / root/rpmbuild/SPECS under this directory

5. Modify the configuration file

Sed-I-e "s/%define no_x11_askpass 0/%define no_x11_askpass 1gamg" openssh.spec sed-I-e "s/%define no_gnome_askpass 0/%define no_gnome_askpass 1gamg" openssh.spec build package rpmbuild-ba openssh.spec errors encountered during compilation: error: build dependency failure: openssl-devel < 1.1 need to be solved by openssh-8.0p1-1.el7.x86_64: [root@ Localhost SPECS] # vim openssh.spec comment out BuildRequires: openssl-devel < 1.1 this line installation package rpm package in rpmbuild/RPMS/x86_64yum install-y. / openssh-* or rpm installation yum installation can automatically resolve dependencies It is recommended to enable the telnet service before upgrading. If the upgrade fails, you can roll back. Restart the service. Test the connection service sshd restart 6systemctl start sshd if the connection is not available. Just try to modify the configuration file PermitRootLogin yes to allow root to login PasswordAuthentication yes to allow login with a password

Refer to blog posts

Https://blog.csdn.net/ansible328/article/details/103016616https://www.cnblogs.com/fsckzy/p/10834550.html

Tags: Production system upgrade file source code directory error service login compilation configuration security one line password suggestion copy comment vulnerability procedure recommendation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB Shulou Technology Shulou Information Shulou Tech Info