Chinaunix首页 | 论坛 | 博客
  • 博客访问: 405233
  • 博文数量: 80
  • 博客积分: 885
  • 博客等级: 准尉
  • 技术积分: 917
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-02 11:43
个人简介

人生就是一次旅行,生活就是艺术,人人都是手艺人.

文章分类

全部博文(80)

文章存档

2023年(1)

2022年(5)

2019年(3)

2018年(1)

2017年(6)

2016年(4)

2014年(8)

2013年(20)

2012年(9)

2010年(3)

2009年(17)

2008年(3)

我的朋友

分类: LINUX

2022-08-18 14:44:50

1、查看ssh版本

点击(此处)折叠或打开

  1. ssh -V


2、升级步骤

点击(此处)折叠或打开

  1. yum install -y gcc openssl-devel pam-devel rpm-build pam-devel
  2. cp -rf /etc/ssh /etc/ssh.bak
  3. cd /data/download/
  4. wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.0p1.tar.gz
  5. tar zxvf openssh-9.0p1.tar.gz
  6. cd openssh-9.0p1
  7. ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappers
  8. echo $?
  9. make && make install
  10. sed -i '77s/^/#/g' /etc/ssh/sshd_config
  11. sed -i '75s/^/#/g' /etc/ssh/sshd_config
  12. service sshd restart
3、如果遇到yum 停止更新问题
替换/etc/yum.repos.d/CentOS-Base.repo

点击(此处)折叠或打开

  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client. You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #

  12. [base]
  13. name=CentOS-$releasever - Base - 163.com
  14. baseurl=http://vault.centos.org/6.10/os/$basearch/
  15. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  16. gpgcheck=1
  17. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

  18. #released updates
  19. [updates]
  20. name=CentOS-$releasever - Updates - 163.com
  21. baseurl=http://vault.centos.org/6.10/updates/$basearch/
  22. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  23. gpgcheck=1
  24. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

  25. #additional packages that may be useful
  26. [extras]
  27. name=CentOS-$releasever - Extras - 163.com
  28. baseurl=http://vault.centos.org/6.10/extras/$basearch/
  29. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  30. gpgcheck=1
  31. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

  32. #additional packages that extend functionality of existing packages
  33. [centosplus]
  34. name=CentOS-$releasever - Plus - 163.com
  35. baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
  36. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  37. gpgcheck=1
  38. enabled=0
  39. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

  40. #contrib - packages by Centos Users
  41. [contrib]
  42. name=CentOS-$releasever - Contrib - 163.com
  43. baseurl=http://vault.centos.org/6.10/contrib/$basearch/
  44. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
  45. gpgcheck=1
  46. enabled=0
  47. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

/etc/yum.repos.d/epel.repo为


点击(此处)折叠或打开

  1. [epel]
  2. name=Extra Packages for Enterprise Linux 6 - $basearch
  3. baseurl=http://mirrors.aliyun.com/epel/6/$basearch
  4.         http://mirrors.aliyuncs.com/epel/6/$basearch
  5. failovermethod=priority
  6. Enabled=0
  7. gpgcheck=0
  8. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
  9.  
  10. [epel-debuginfo]
  11. name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
  12. baseurl=http://mirrors.aliyun.com/epel/6/$basearch/debug
  13.         http://mirrors.aliyuncs.com/epel/6/$basearch/debug
  14. failovermethod=priority
  15. enabled=0
  16. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
  17. gpgcheck=0
  18.  
  19. [epel-source]
  20. name=Extra Packages for Enterprise Linux 6 - $basearch - Source
  21. baseurl=http://mirrors.aliyun.com/epel/6/SRPMS
  22.         http://mirrors.aliyuncs.com/epel/6/SRPMS
  23. failovermethod=priority
  24. enabled=0
  25. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
  26. gpgcheck=0



阅读(650) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~