Package:
1. ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
2. http://rpmfind.net/contains: *.src.rpm
Method One:
1. Mkdir/root/rpmbuild/{source SPECS}-P
2. Cp/tmp/openssh.spec specs/
Note: Openssh.spec can be RPM-IVH openssh-6.6p1.src.rpm after installation, package and address 2 can be confirmed!
3. cp/tmp/openssh-7.0p1.tar.gz sources/
Note: Can be downloaded from address 1
4. Vim Specs/openssh.spec
#%define ver 6.6p1
#%define rel 1
%define ver 7.0p1 Modify this line to replace the 7.0P1 location with the version you want to update.
%define rel 1
5. RPMBUILD-BB Specs/openssh.spec
6. View the compiled results
[Email protected] ~]# ls/root/rpmbuild/rpms/x86_64/
openssh-7.0p1-1.x86_64.rpm openssh-clients-7.0p1-1.x86_64.rpm openssh-debuginfo-7.0p1-1.x86_64.rpm openssh-server-7.0p1-1.x86_64.rpm
7. Installation: RPM-UVH rpms/x86_64/*.rpm
Note that you are not I or will error
8. Modify the configuration file, or you cannot log in as root
[Email protected] ~]# Vim/etc/ssh/sshd_config
#PermitRootLogin Prohibit-password before modification
Permitrootlogin Yes after modification
9./etc/init.d/sshd Restart
Method Two:
1. RPM-IVH openssh-5.3p1-111.el6.src.rpm received by address 2 http://rpmfind.net/linux/RPM/centos/7.1.1503/x86_64/Packages/ Openssh-6.6.1p1-11.el7.x86_64.html
2. After installation, you will get two folders (containing files) as follows:
[Email protected] ~]# tree
[[email protected] ~]# ls rpmbuild
SOURCES SPECS
3. Vim Rpmbuild/specs/openssh.spec
%define Openssh_ver 5.3P1
source0:openssh-%{version}-noacss.tar.bz2
After modification
%define Openssh_ver 7.0p1
Source0:openssh-%{version}.tar.gz
Delete all patch-related content (Note: Remove the patch, because the new package has integrated all the vulnerabilities, otherwise wayward error)
4. Rpmbuild/specs/openssh.spec
5. Method Ibid.
Note: There are some problems with this method (it seems that the patch-related content has not been deleted, the test failed, the method of a openssh.spec without patches, successful execution)
CENTOS6 Upgrade openssh7.0