wget下载一个最新版本的openssh
https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/
tar -xvf openssh-7.9p1.tar.gz
cd openssh-7.9p1
./configure
make && make install
ssh -V
service sshd restart
安装之前还是要做一下准备工作,比如安装telnet,我的dell是开了idrac,所有没有关系,直接升级
先安装一下相关软件:
yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel pcre-devel pam-devel
yum install -y pam* zlib*
再来configure和make
centos换源的方法
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
EPEL源
EPEL源在CentOS默认不存在,需要下载安装
yum list | grep epel-release
yum install epel-release
安装完成后,在/etc/yum.repos.d
多出如下两个文件
epel-testing.repo epel.repo
下载阿里开源镜像的EPEL源
wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
之后运行
yum clean all
yum makecache
生成缓存
没事别update,这样会更新所有包和内核,软件设置不保留!!!
yum update
upgrade相对安全一点,更新所有包,但保留设置,也不更新内核!!
yum upgrade