1:拷贝编译好rpm安装包 [root@liwm ~]# scp -r root@192.168.31.130:/home/openssh7.8 /home/ root@192.168.31.130's password: openssh-7.8p1-1.el7.x86_64.rpm 100% 486KB 6.8MB/s 00:00 openssh-askpass-7.8p1-1.el7.x86_64.rpm 100% 43KB 4.4MB/s 00:00 openssh-askpass-gnome-7.8p1-1.el7.x86_64.rpm 100% 24KB 3.8MB/s 00:00 openssh-clients-7.8p1-1.el7.x86_64.rpm 100% 515KB 8.6MB/s 00:00 openssh-debuginfo-7.8p1-1.el7.x86_64.rpm 100% 2453KB 9.0MB/s 00:00 openssh-server-7.8p1-1.el7.x86_64.rpm 100% 384KB 7.6MB/s 00:00 [root@liwm ~]# cd /home/ [root@liwm home]# ll total 0 drwxr-xr-x 2 root root 281 Nov 8 15:15 openssh7.8 2:进入rpm安装包目录 [root@liwm home]# cd openssh7.8/ [root@liwm openssh7.8]# 3:添加本地yun源仓库 [root@liwm openssh7.8]# scp root@192.168.31.121:/etc/yum.repos.d/centos-yum.repo /etc/yum.repos.d/ The authenticity of host '192.168.31.121 (192.168.31.121)' can't be established. ECDSA key fingerprint is SHA256:Yq4BLS1rF1GUaLIiquAd/ibJx44e9k9QXOt2ks913uw. ECDSA key fingerprint is MD5:9a:14:cb:b7:27:e6:e5:86:30:5c:2d:d4:a5:69:4a:2f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.31.121' (ECDSA) to the list of known hosts. root@192.168.31.121's password: centos-yum.repo 100% 97 3.5KB/s 00:00 4:检测yum源是否可 [root@liwm openssh7.8]# yum repolist Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Yum-server | 3.6 kB 00:00:00 (1/2): Yum-server/group_gz | 156 kB 00:00:00 (2/2): Yum-server/primary_db | 3.1 MB 00:00:00 repo id repo name status Yum-server CentOS7 Yum-server 3,894 repolist: 3,894 [root@liwm openssh7.8]# 5:准备工作完成、开始安装 目前版本为:OpenSSH_7.4p1 [root@liwm openssh7.8]# ssh -V OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 6:使用yum localinstall 加载本地rpm包,自动解决依赖包 [root@liwm openssh7.8]# yum localinstall *rpm Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Examining openssh-7.8p1-1.el7.x86_64.rpm: openssh-7.8p1-1.el7.x86_64 Marking openssh-7.8p1-1.el7.x86_64.rpm as an update to openssh-7.4p1-16.el7.x86_64 Examining openssh-askpass-7.8p1-1.el7.x86_64.rpm: openssh-askpass-7.8p1-1.el7.x86_64 Marking openssh-askpass-7.8p1-1.el7.x86_64.rpm to be installed Examining openssh-askpass-gnome-7.8p1-1.el7.x86_64.rpm: openssh-askpass-gnome-7.8p1-1.el7.x86_64 Marking openssh-askpass-gnome-7.8p1-1.el7.x86_64.rpm to be installed Examining openssh-clients-7.8p1-1.el7.x86_64.rpm: openssh-clients-7.8p1-1.el7.x86_64 Marking openssh-clients-7.8p1-1.el7.x86_64.rpm as an update to openssh-clients-7.4p1-16.el7.x86_64 Examining openssh-debuginfo-7.8p1-1.el7.x86_64.rpm: openssh-debuginfo-7.8p1-1.el7.x86_64 Marking openssh-debuginfo-7.8p1-1.el7.x86_64.rpm to be installed Examining openssh-server-7.8p1-1.el7.x86_64.rpm: openssh-server-7.8p1-1.el7.x86_64 Marking openssh-server-7.8p1-1.el7.x86_64.rpm as an update to openssh-server-7.4p1-16.el7.x86_64 Resolving Dependencies --> Running transaction check ---> Package openssh.x86_64 0:7.4p1-16.el7 will be updated ---> Package openssh.x86_64 0:7.8p1-1.el7 will be an update ---> Package openssh-askpass.x86_64 0:7.8p1-1.el7 will be installed --> Processing Dependency: libICE.so.6()(64bit) for package: openssh-askpass-7.8p1-1.el7.x86_64 --> Processing Dependency: libSM.so.6()(64bit) for package: openssh-askpass-7.8p1-1.el7.x86_64 --> Processing Dependency: libXt.so.6()(64bit) for package: openssh-askpass-7.8p1-1.el7.x86_64 ---> Package openssh-askpass-gnome.x86_64 0:7.8p1-1.el7 will be installed --> Processing Dependency: libatk-1.0.so.0()(64bit) for package: openssh-askpass-gnome-7.8p1-1.el7.x86_64 --> Processing Dependency: libcairo.so.2()(64bit) for package: openssh-askpass-gnome-7.8p1-1.el7.x86_64 --> Processing Dependency: libfontconfig.so.1()(64bit) for package: openssh-askpass-gnome-7.8p1-1.el7.x86_64 --> Processing Dependency: libgdk-x11-2.0.so.0()(64bit) for package: openssh-askpass-gnome-7.8p1-1.el7.x86_64 --> Processing Dependency: libgtk-x11-2.0.so.0()(64bit) for package: openssh-askpass-gnome-7.8p1-1.el7.x86_64 --> Processing Dependency: libpango-1.0.so.0()(64bit) for package: openssh-askpass-gnome-7.8p1-1.el7.x86_64 --> Processing Dependency: libpangocairo-1.0.so.0()(64bit) for package: openssh-askpass-gnome-7.8p1-1.el7.x86_64 --> Processing Dependency: libpangoft2-1.0.so.0()(64bit) for package: openssh-askpass-gnome-7.8p1-1.el7.x86_64 ---> Package openssh-clients.x86_64 0:7.4p1-16.el7 will be updated ---> Package openssh-clients.x86_64 0:7.8p1-1.el7 will be an update ---> Package openssh-debuginfo.x86_64 0:7.8p1-1.el7 will be installed ---> Package openssh-server.x86_64 0:7.4p1-16.el7 will be updated ---> Package openssh-server.x86_64 0:7.8p1-1.el7 will be an update --> Running transaction check ---> Package atk.x86_64 0:2.22.0-3.el7 will be installed ---> Package cairo.x86_64 0:1.14.8-2.el7 will be installed --> Processing Dependency: libpixman-1.so.0()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libXrender.so.1()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libXext.so.6()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libGL.so.1()(64bit) for package: cairo-1.14.8-2.el7.x86_64 --> Processing Dependency: libEGL.so.1()(64bit) for package: cairo-1.14.8-2.el7.x86_64 ---> Package fontconfig.x86_64 0:2.10.95-11.el7 will be installed --> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.10.95-11.el7.x86_64 --> Processing Dependency: font(:lang=en) for package: fontconfig-2.10.95-11.el7.x86_64 ---> Package gtk2.x86_64 0:2.24.31-1.el7 will be installed --> Processing Dependency: libXrandr >= 1.2.99.4-2 for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: hicolor-icon-theme for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: gtk-update-icon-cache for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: libcups.so.2()(64bit) for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: libXrandr.so.2()(64bit) for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: libXinerama.so.1()(64bit) for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: libXi.so.6()(64bit) for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: libXfixes.so.3()(64bit) for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: libXdamage.so.1()(64bit) for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: libXcursor.so.1()(64bit) for package: gtk2-2.24.31-1.el7.x86_64 --> Processing Dependency: libXcomposite.so.1()(64bit) for package: gtk2-2.24.31-1.el7.x86_64 ---> Package libICE.x86_64 0:1.0.9-9.el7 will be installed ---> Package libSM.x86_64 0:1.2.2-2.el7 will be installed ---> Package libXt.x86_64 0:1.1.5-3.el7 will be installed ---> Package pango.x86_64 0:1.40.4-1.el7 will be installed --> Processing Dependency: libthai(x86-64) >= 0.1.9 for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libXft(x86-64) >= 2.0.0 for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: harfbuzz(x86-64) >= 1.0.3 for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libthai.so.0(LIBTHAI_0.1)(64bit) for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libthai.so.0()(64bit) for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libharfbuzz.so.0()(64bit) for package: pango-1.40.4-1.el7.x86_64 --> Processing Dependency: libXft.so.2()(64bit) for package: pango-1.40.4-1.el7.x86_64 --> Running transaction check ---> Package cups-libs.x86_64 1:1.6.3-29.el7 will be installed --> Processing Dependency: libavahi-common.so.3()(64bit) for package: 1:cups-libs-1.6.3-29.el7.x86_64 --> Processing Dependency: libavahi-client.so.3()(64bit) for package: 1:cups-libs-1.6.3-29.el7.x86_64 ---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed ---> Package gtk-update-icon-cache.x86_64 0:3.22.10-4.el7 will be installed ---> Package harfbuzz.x86_64 0:1.3.2-1.el7 will be installed --> Processing Dependency: libgraphite2.so.3()(64bit) for package: harfbuzz-1.3.2-1.el7.x86_64 ---> Package hicolor-icon-theme.noarch 0:0.12-7.el7 will be installed ---> Package libXcomposite.x86_64 0:0.4.4-4.1.el7 will be installed ---> Package libXcursor.x86_64 0:1.1.14-8.el7 will be installed ---> Package libXdamage.x86_64 0:1.1.4-4.1.el7 will be installed ---> Package libXext.x86_64 0:1.3.3-3.el7 will be installed ---> Package libXfixes.x86_64 0:5.0.3-1.el7 will be installed ---> Package libXft.x86_64 0:2.3.2-2.el7 will be installed ---> Package libXi.x86_64 0:1.7.9-1.el7 will be installed ---> Package libXinerama.x86_64 0:1.1.3-2.1.el7 will be installed ---> Package libXrandr.x86_64 0:1.5.1-2.el7 will be installed ---> Package libXrender.x86_64 0:0.9.10-1.el7 will be installed ---> Package libthai.x86_64 0:0.1.14-9.el7 will be installed ---> Package mesa-libEGL.x86_64 0:17.0.1-6.20170307.el7 will be installed --> Processing Dependency: mesa-libgbm = 17.0.1-6.20170307.el7 for package: mesa-libEGL-17.0.1-6.20170307.el7.x86_64 --> Processing Dependency: libxshmfence.so.1()(64bit) for package: mesa-libEGL-17.0.1-6.20170307.el7.x86_64 --> Processing Dependency: libgbm.so.1()(64bit) for package: mesa-libEGL-17.0.1-6.20170307.el7.x86_64 ---> Package mesa-libGL.x86_64 0:17.0.1-6.20170307.el7 will be installed --> Processing Dependency: mesa-libglapi = 17.0.1-6.20170307.el7 for package: mesa-libGL-17.0.1-6.20170307.el7.x86_64 --> Processing Dependency: libglapi.so.0()(64bit) for package: mesa-libGL-17.0.1-6.20170307.el7.x86_64 --> Processing Dependency: libXxf86vm.so.1()(64bit) for package: mesa-libGL-17.0.1-6.20170307.el7.x86_64 ---> Package pixman.x86_64 0:0.34.0-1.el7 will be installed ---> Package stix-fonts.noarch 0:1.1.0-5.el7 will be installed --> Running transaction check ---> Package avahi-libs.x86_64 0:0.6.31-17.el7 will be installed ---> Package graphite2.x86_64 0:1.3.6-1.el7_2 will be installed ---> Package libXxf86vm.x86_64 0:1.1.4-1.el7 will be installed ---> Package libxshmfence.x86_64 0:1.2-1.el7 will be installed ---> Package mesa-libgbm.x86_64 0:17.0.1-6.20170307.el7 will be installed ---> Package mesa-libglapi.x86_64 0:17.0.1-6.20170307.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =============================================================================================== Package Arch Version Repository Size =============================================================================================== Installing: openssh-askpass x86_64 7.8p1-1.el7 /openssh-askpass-7.8p1-1.el7.x86_64 78 k openssh-askpass-gnome x86_64 7.8p1-1.el7 /openssh-askpass-gnome-7.8p1-1.el7.x86_64 16 k openssh-debuginfo x86_64 7.8p1-1.el7 /openssh-debuginfo-7.8p1-1.el7.x86_64 12 M Updating: openssh x86_64 7.8p1-1.el7 /openssh-7.8p1-1.el7.x86_64 2.1 M openssh-clients x86_64 7.8p1-1.el7 /openssh-clients-7.8p1-1.el7.x86_64 1.9 M openssh-server x86_64 7.8p1-1.el7 /openssh-server-7.8p1-1.el7.x86_64 921 k Installing for dependencies: atk x86_64 2.22.0-3.el7 Yum-server 258 k avahi-libs x86_64 0.6.31-17.el7 Yum-server 61 k cairo x86_64 1.14.8-2.el7 Yum-server 713 k cups-libs x86_64 1:1.6.3-29.el7 Yum-server 356 k fontconfig x86_64 2.10.95-11.el7 Yum-server 229 k fontpackages-filesystem noarch 1.44-8.el7 Yum-server 9.9 k graphite2 x86_64 1.3.6-1.el7_2 Yum-server 112 k gtk-update-icon-cache x86_64 3.22.10-4.el7 Yum-server 28 k gtk2 x86_64 2.24.31-1.el7 Yum-server 3.4 M harfbuzz x86_64 1.3.2-1.el7 Yum-server 177 k hicolor-icon-theme noarch 0.12-7.el7 Yum-server 42 k libICE x86_64 1.0.9-9.el7 Yum-server 66 k libSM x86_64 1.2.2-2.el7 Yum-server 39 k libXcomposite x86_64 0.4.4-4.1.el7 Yum-server 22 k libXcursor x86_64 1.1.14-8.el7 Yum-server 30 k libXdamage x86_64 1.1.4-4.1.el7 Yum-server 20 k libXext x86_64 1.3.3-3.el7 Yum-server 39 k libXfixes x86_64 5.0.3-1.el7 Yum-server 18 k libXft x86_64 2.3.2-2.el7 Yum-server 58 k libXi x86_64 1.7.9-1.el7 Yum-server 40 k libXinerama x86_64 1.1.3-2.1.el7 Yum-server 14 k libXrandr x86_64 1.5.1-2.el7 Yum-server 27 k libXrender x86_64 0.9.10-1.el7 Yum-server 26 k libXt x86_64 1.1.5-3.el7 Yum-server 173 k libXxf86vm x86_64 1.1.4-1.el7 Yum-server 18 k libthai x86_64 0.1.14-9.el7 Yum-server 187 k libxshmfence x86_64 1.2-1.el7 Yum-server 7.2 k mesa-libEGL x86_64 17.0.1-6.20170307.el7 Yum-server 82 k mesa-libGL x86_64 17.0.1-6.20170307.el7 Yum-server 155 k mesa-libgbm x86_64 17.0.1-6.20170307.el7 Yum-server 32 k mesa-libglapi x86_64 17.0.1-6.20170307.el7 Yum-server 41 k pango x86_64 1.40.4-1.el7 Yum-server 275 k pixman x86_64 0.34.0-1.el7 Yum-server 248 k stix-fonts noarch 1.1.0-5.el7 Yum-server 1.3 M Transaction Summary =============================================================================================== Install 3 Packages (+34 Dependent packages) Upgrade 3 Packages Total size: 25 M Total download size: 8.2 M Is this ok [y/d/N]: y Downloading packages: (1/34): atk-2.22.0-3.el7.x86_64.rpm | 258 kB 00:00:00 (2/34): avahi-libs-0.6.31-17.el7.x86_64.rpm | 61 kB 00:00:00 (3/34): cairo-1.14.8-2.el7.x86_64.rpm | 713 kB 00:00:00 (4/34): fontconfig-2.10.95-11.el7.x86_64.rpm | 229 kB 00:00:00 (5/34): cups-libs-1.6.3-29.el7.x86_64.rpm | 356 kB 00:00:00 (6/34): fontpackages-filesystem-1.44-8.el7.noarch.rpm | 9.9 kB 00:00:00 (7/34): gtk-update-icon-cache-3.22.10-4.el7.x86_64.rpm | 28 kB 00:00:00 (8/34): gtk2-2.24.31-1.el7.x86_64.rpm | 3.4 MB 00:00:00 (9/34): harfbuzz-1.3.2-1.el7.x86_64.rpm | 177 kB 00:00:00 (10/34): graphite2-1.3.6-1.el7_2.x86_64.rpm | 112 kB 00:00:00 (11/34): hicolor-icon-theme-0.12-7.el7.noarch.rpm | 42 kB 00:00:00 (12/34): libSM-1.2.2-2.el7.x86_64.rpm | 39 kB 00:00:00 (13/34): libXcomposite-0.4.4-4.1.el7.x86_64.rpm | 22 kB 00:00:00 (14/34): libXcursor-1.1.14-8.el7.x86_64.rpm | 30 kB 00:00:00 (15/34): libICE-1.0.9-9.el7.x86_64.rpm | 66 kB 00:00:00 (16/34): libXdamage-1.1.4-4.1.el7.x86_64.rpm | 20 kB 00:00:00 (17/34): libXext-1.3.3-3.el7.x86_64.rpm | 39 kB 00:00:00 (18/34): libXfixes-5.0.3-1.el7.x86_64.rpm | 18 kB 00:00:00 (19/34): libXft-2.3.2-2.el7.x86_64.rpm | 58 kB 00:00:00 (20/34): libXinerama-1.1.3-2.1.el7.x86_64.rpm | 14 kB 00:00:00 (21/34): libXrandr-1.5.1-2.el7.x86_64.rpm | 27 kB 00:00:00 (22/34): libXrender-0.9.10-1.el7.x86_64.rpm | 26 kB 00:00:00 (23/34): libXi-1.7.9-1.el7.x86_64.rpm | 40 kB 00:00:00 (24/34): libXt-1.1.5-3.el7.x86_64.rpm | 173 kB 00:00:00 (25/34): libthai-0.1.14-9.el7.x86_64.rpm | 187 kB 00:00:00 (26/34): libxshmfence-1.2-1.el7.x86_64.rpm | 7.2 kB 00:00:00 (27/34): mesa-libEGL-17.0.1-6.20170307.el7.x86_64.rpm | 82 kB 00:00:00 (28/34): libXxf86vm-1.1.4-1.el7.x86_64.rpm | 18 kB 00:00:00 (29/34): mesa-libGL-17.0.1-6.20170307.el7.x86_64.rpm | 155 kB 00:00:00 (30/34): mesa-libgbm-17.0.1-6.20170307.el7.x86_64.rpm | 32 kB 00:00:00 (31/34): mesa-libglapi-17.0.1-6.20170307.el7.x86_64.rpm | 41 kB 00:00:00 (32/34): pango-1.40.4-1.el7.x86_64.rpm | 275 kB 00:00:00 (33/34): pixman-0.34.0-1.el7.x86_64.rpm | 248 kB 00:00:00 (34/34): stix-fonts-1.1.0-5.el7.noarch.rpm | 1.3 MB 00:00:00 ----------------------------------------------------------------------------------------------- Total 12 MB/s | 8.2 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libXext-1.3.3-3.el7.x86_64 1/43 Installing : libXrender-0.9.10-1.el7.x86_64 2/43 Installing : libXfixes-5.0.3-1.el7.x86_64 3/43 Updating : openssh-7.8p1-1.el7.x86_64 4/43 Installing : libICE-1.0.9-9.el7.x86_64 5/43 Installing : libSM-1.2.2-2.el7.x86_64 6/43 Installing : libXdamage-1.1.4-4.1.el7.x86_64 7/43 Installing : libxshmfence-1.2-1.el7.x86_64 8/43 Installing : mesa-libglapi-17.0.1-6.20170307.el7.x86_64 9/43 Installing : fontpackages-filesystem-1.44-8.el7.noarch 10/43 Installing : atk-2.22.0-3.el7.x86_64 11/43 Installing : stix-fonts-1.1.0-5.el7.noarch 12/43 Installing : fontconfig-2.10.95-11.el7.x86_64 13/43 Installing : libXft-2.3.2-2.el7.x86_64 14/43 Installing : mesa-libgbm-17.0.1-6.20170307.el7.x86_64 15/43 Installing : mesa-libEGL-17.0.1-6.20170307.el7.x86_64 16/43 Installing : libXt-1.1.5-3.el7.x86_64 17/43 Installing : libXcursor-1.1.14-8.el7.x86_64 18/43 Installing : libXrandr-1.5.1-2.el7.x86_64 19/43 Installing : libXinerama-1.1.3-2.1.el7.x86_64 20/43 Installing : libXxf86vm-1.1.4-1.el7.x86_64 21/43 Installing : mesa-libGL-17.0.1-6.20170307.el7.x86_64 22/43 Installing : libXi-1.7.9-1.el7.x86_64 23/43 Installing : graphite2-1.3.6-1.el7_2.x86_64 24/43 Installing : harfbuzz-1.3.2-1.el7.x86_64 25/43 Installing : pixman-0.34.0-1.el7.x86_64 26/43 Installing : cairo-1.14.8-2.el7.x86_64 27/43 Installing : gtk-update-icon-cache-3.22.10-4.el7.x86_64 28/43 Installing : libthai-0.1.14-9.el7.x86_64 29/43 Installing : pango-1.40.4-1.el7.x86_64 30/43 Installing : libXcomposite-0.4.4-4.1.el7.x86_64 31/43 Installing : hicolor-icon-theme-0.12-7.el7.noarch 32/43 Installing : avahi-libs-0.6.31-17.el7.x86_64 33/43 Installing : 1:cups-libs-1.6.3-29.el7.x86_64 34/43 Installing : gtk2-2.24.31-1.el7.x86_64 35/43 Installing : openssh-askpass-gnome-7.8p1-1.el7.x86_64 36/43 Installing : openssh-askpass-7.8p1-1.el7.x86_64 37/43 Updating : openssh-server-7.8p1-1.el7.x86_64 38/43 Updating : openssh-clients-7.8p1-1.el7.x86_64 39/43 Installing : openssh-debuginfo-7.8p1-1.el7.x86_64 40/43 Cleanup : openssh-clients-7.4p1-16.el7.x86_64 41/43 Cleanup : openssh-server-7.4p1-16.el7.x86_64 42/43 Cleanup : openssh-7.4p1-16.el7.x86_64 43/43 Verifying : libXext-1.3.3-3.el7.x86_64 1/43 Verifying : atk-2.22.0-3.el7.x86_64 2/43 Verifying : libICE-1.0.9-9.el7.x86_64 3/43 Verifying : libXinerama-1.1.3-2.1.el7.x86_64 4/43 Verifying : openssh-server-7.8p1-1.el7.x86_64 5/43 Verifying : openssh-clients-7.8p1-1.el7.x86_64 6/43 Verifying : 1:cups-libs-1.6.3-29.el7.x86_64 7/43 Verifying : libXxf86vm-1.1.4-1.el7.x86_64 8/43 Verifying : openssh-debuginfo-7.8p1-1.el7.x86_64 9/43 Verifying : libXi-1.7.9-1.el7.x86_64 10/43 Verifying : libXt-1.1.5-3.el7.x86_64 11/43 Verifying : harfbuzz-1.3.2-1.el7.x86_64 12/43 Verifying : gtk2-2.24.31-1.el7.x86_64 13/43 Verifying : avahi-libs-0.6.31-17.el7.x86_64 14/43 Verifying : hicolor-icon-theme-0.12-7.el7.noarch 15/43 Verifying : cairo-1.14.8-2.el7.x86_64 16/43 Verifying : openssh-7.8p1-1.el7.x86_64 17/43 Verifying : fontpackages-filesystem-1.44-8.el7.noarch 18/43 Verifying : stix-fonts-1.1.0-5.el7.noarch 19/43 Verifying : libXcomposite-0.4.4-4.1.el7.x86_64 20/43 Verifying : libthai-0.1.14-9.el7.x86_64 21/43 Verifying : libXft-2.3.2-2.el7.x86_64 22/43 Verifying : libXrender-0.9.10-1.el7.x86_64 23/43 Verifying : openssh-askpass-7.8p1-1.el7.x86_64 24/43 Verifying : mesa-libEGL-17.0.1-6.20170307.el7.x86_64 25/43 Verifying : gtk-update-icon-cache-3.22.10-4.el7.x86_64 26/43 Verifying : mesa-libGL-17.0.1-6.20170307.el7.x86_64 27/43 Verifying : pango-1.40.4-1.el7.x86_64 28/43 Verifying : openssh-askpass-gnome-7.8p1-1.el7.x86_64 29/43 Verifying : mesa-libglapi-17.0.1-6.20170307.el7.x86_64 30/43 Verifying : pixman-0.34.0-1.el7.x86_64 31/43 Verifying : mesa-libgbm-17.0.1-6.20170307.el7.x86_64 32/43 Verifying : libxshmfence-1.2-1.el7.x86_64 33/43 Verifying : libSM-1.2.2-2.el7.x86_64 34/43 Verifying : fontconfig-2.10.95-11.el7.x86_64 35/43 Verifying : graphite2-1.3.6-1.el7_2.x86_64 36/43 Verifying : libXrandr-1.5.1-2.el7.x86_64 37/43 Verifying : libXdamage-1.1.4-4.1.el7.x86_64 38/43 Verifying : libXfixes-5.0.3-1.el7.x86_64 39/43 Verifying : libXcursor-1.1.14-8.el7.x86_64 40/43 Verifying : openssh-server-7.4p1-16.el7.x86_64 41/43 Verifying : openssh-7.4p1-16.el7.x86_64 42/43 Verifying : openssh-clients-7.4p1-16.el7.x86_64 43/43 Installed: openssh-askpass.x86_64 0:7.8p1-1.el7 openssh-askpass-gnome.x86_64 0:7.8p1-1.el7 openssh-debuginfo.x86_64 0:7.8p1-1.el7 Dependency Installed: atk.x86_64 0:2.22.0-3.el7 avahi-libs.x86_64 0:0.6.31-17.el7 cairo.x86_64 0:1.14.8-2.el7 cups-libs.x86_64 1:1.6.3-29.el7 fontconfig.x86_64 0:2.10.95-11.el7 fontpackages-filesystem.noarch 0:1.44-8.el7 graphite2.x86_64 0:1.3.6-1.el7_2 gtk-update-icon-cache.x86_64 0:3.22.10-4.el7 gtk2.x86_64 0:2.24.31-1.el7 harfbuzz.x86_64 0:1.3.2-1.el7 hicolor-icon-theme.noarch 0:0.12-7.el7 libICE.x86_64 0:1.0.9-9.el7 libSM.x86_64 0:1.2.2-2.el7 libXcomposite.x86_64 0:0.4.4-4.1.el7 libXcursor.x86_64 0:1.1.14-8.el7 libXdamage.x86_64 0:1.1.4-4.1.el7 libXext.x86_64 0:1.3.3-3.el7 libXfixes.x86_64 0:5.0.3-1.el7 libXft.x86_64 0:2.3.2-2.el7 libXi.x86_64 0:1.7.9-1.el7 libXinerama.x86_64 0:1.1.3-2.1.el7 libXrandr.x86_64 0:1.5.1-2.el7 libXrender.x86_64 0:0.9.10-1.el7 libXt.x86_64 0:1.1.5-3.el7 libXxf86vm.x86_64 0:1.1.4-1.el7 libthai.x86_64 0:0.1.14-9.el7 libxshmfence.x86_64 0:1.2-1.el7 mesa-libEGL.x86_64 0:17.0.1-6.20170307.el7 mesa-libGL.x86_64 0:17.0.1-6.20170307.el7 mesa-libgbm.x86_64 0:17.0.1-6.20170307.el7 mesa-libglapi.x86_64 0:17.0.1-6.20170307.el7 pango.x86_64 0:1.40.4-1.el7 pixman.x86_64 0:0.34.0-1.el7 stix-fonts.noarch 0:1.1.0-5.el7 Updated: openssh.x86_64 0:7.8p1-1.el7 openssh-clients.x86_64 0:7.8p1-1.el7 openssh-server.x86_64 0:7.8p1-1.el7 Complete! 7:升级完成、这时ssh服务无法启动、终端千万不要退出和中断 [root@liwm openssh7.8]# systemctl status sshd.service ● sshd.service - SYSV: OpenSSH server daemon Loaded: loaded (/etc/rc.d/init.d/sshd; bad; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2018-11-08 15:18:12 CST; 11s ago Docs: man:systemd-sysv-generator(8) Process: 1548 ExecStop=/etc/rc.d/init.d/sshd stop (code=exited, status=0/SUCCESS) Process: 1554 ExecStart=/etc/rc.d/init.d/sshd start (code=exited, status=1/FAILURE) Main PID: 992 (code=exited, status=0/SUCCESS) Nov 08 15:18:12 liwm sshd[1554]: It is required that your private key files are NOT acce...ers. Nov 08 15:18:12 liwm sshd[1554]: This private key will be ignored. Nov 08 15:18:12 liwm sshd[1554]: Error loading host key "/etc/ssh/ssh_host_ed25519_key":...ions Nov 08 15:18:12 liwm sshd[1554]: Could not load host key: /etc/ssh/ssh_host_ed25519_key Nov 08 15:18:12 liwm sshd[1554]: sshd: no hostkeys available -- exiting. Nov 08 15:18:12 liwm sshd[1554]: [FAILED] Nov 08 15:18:12 liwm systemd[1]: sshd.service: control process exited, code=exited status=1 Nov 08 15:18:12 liwm systemd[1]: Failed to start SYSV: OpenSSH server daemon. Nov 08 15:18:12 liwm systemd[1]: Unit sshd.service entered failed state. Nov 08 15:18:12 liwm systemd[1]: sshd.service failed. Hint: Some lines were ellipsized, use -l to show in full. 8:根据启动提示 Error loading host key "/etc/ssh/ssh_host_ed25519_key" 修改配置文件权限为 600 [root@liwm openssh7.8]# chmod 600 /etc/ssh/ssh_host_ed25519_key 9:启动sshd服务 [root@liwm openssh7.8]# systemctl restart sshd.service 10:检查sshd服务启动 [root@liwm openssh7.8]# systemctl status sshd.service ● sshd.service - SYSV: OpenSSH server daemon Loaded: loaded (/etc/rc.d/init.d/sshd; bad; vendor preset: enabled) Active: active (running) since Thu 2018-11-08 15:19:00 CST; 5s ago Docs: man:systemd-sysv-generator(8) Process: 1548 ExecStop=/etc/rc.d/init.d/sshd stop (code=exited, status=0/SUCCESS) Process: 1596 ExecStart=/etc/rc.d/init.d/sshd start (code=exited, status=0/SUCCESS) Main PID: 1604 (sshd) CGroup: /system.slice/sshd.service └─1604 /usr/sbin/sshd Nov 08 15:19:00 liwm sshd[1596]: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Nov 08 15:19:00 liwm sshd[1596]: Permissions 0640 for '/etc/ssh/ssh_host_ecdsa_key' are ...pen. Nov 08 15:19:00 liwm sshd[1596]: It is required that your private key files are NOT acce...ers. Nov 08 15:19:00 liwm sshd[1596]: This private key will be ignored. Nov 08 15:19:00 liwm sshd[1596]: Error loading host key "/etc/ssh/ssh_host_ecdsa_key": b...ions Nov 08 15:19:00 liwm sshd[1596]: Could not load host key: /etc/ssh/ssh_host_ecdsa_key Nov 08 15:19:00 liwm sshd[1604]: Server listening on 0.0.0.0 port 22. Nov 08 15:19:00 liwm sshd[1604]: Server listening on :: port 22. Nov 08 15:19:00 liwm systemd[1]: Started SYSV: OpenSSH server daemon. Nov 08 15:19:00 liwm sshd[1596]: [ OK ] Hint: Some lines were ellipsized, use -l to show in full. 11:开启root 远程终端登录 [root@liwm openssh7.8]# echo "PermitRootLogin yes" >> /etc/ssh/sshd_config 12:sshd服务重启 [root@liwm openssh7.8]# systemctl restart sshd.service 13:退出终端 检查root 是否可以登录 [root@liwm openssh7.8]# exit logout Connection closing...Socket close. Connection closed by foreign host. Disconnected from remote host(192.168.31.203:22) at 15:20:26. Type `help' to learn how to use Xshell prompt. [D:~]$ ssh 192.168.31.203 Connecting to 192.168.31.203:22... Connection established. To escape to local shell, press Ctrl+Alt+]. Last login: Thu Nov 8 15:20:21 2018 from 172.5.0.243 ABRT has detected 3 problem(s). For more info run: abrt-cli list --since 1541661621 14:登录成功 检查openssh 版本 升级完成 [root@liwm ~]# ssh -V OpenSSH_7.8p1, OpenSSL 1.0.2k-fips 26 Jan 2017 [root@liwm ~]#