CENTOS6 Upgrade openssh7.0

Source: Internet
Author: User
Tags rpmbuild

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

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.